Skip to content

Commit 2262c30

Browse files
authored
Update tutorial-six-python.md
A while loop if necessary here because otherwise if the client receive a message with the wrong correlation_id, then the self.response will be None and there will be Exception due to return int(None) in the next section.
1 parent 6b9a444 commit 2262c30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

site/tutorials/tutorial-six-python.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ class FibonacciRpcClient(object):
312312
correlation_id=self.corr_id,
313313
),
314314
body=str(n))
315-
self.connection.process_data_events(time_limit=None)
315+
while self.response is None:
316+
self.connection.process_data_events(time_limit=None)
316317
return int(self.response)
317318

318319

0 commit comments

Comments
 (0)