Skip to content

Commit 0a09482

Browse files
CagriYoncaGSVarsha
authored andcommitted
fix: added exception for pika consumer
Signed-off-by: Cagri Yonca <[email protected]>
1 parent 19b6ed5 commit 0a09482

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/instana/instrumentation/pika.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ def _consume(gen: Iterator[object]) -> object:
255255

256256
try:
257257
yield yielded
258+
except GeneratorExit:
259+
gen.close()
258260
except Exception as exc:
259261
span.record_exception(exc)
260262

0 commit comments

Comments
 (0)