Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating listeners should be thread safe #174

Merged
merged 1 commit into from Oct 27, 2017

Conversation

sc13-bioinf
Copy link

This allows clients to stop listening before shutdown without hitting things like:

Exception in thread StompReceiverThread-3:
Traceback (most recent call last):
File "/projects/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/projects/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/projects/lib/python3.6/site-packages/stomp/transport.py", line 335, in __receiver_loop
self.process_frame(f, frame)
File "/projects/lib/python3.6/site-packages/stomp/transport.py", line 188, in process_frame
self.notify(frame_type, f.headers, f.body)
File "/projects/lib/python3.6/site-packages/stomp/transport.py", line 221, in notify
for listener in self.listeners.values():
RuntimeError: dictionary changed size during iteration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants