Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #3469 by making a copy of the callbacks dict.
This partially reverts changes from #3470. I think the underlying assumptions around send_sync_message and callbacks are: 1. send_sync_message is only ever called once per message. When the original sync happens, either we put the message on the queue or we send it immediately, and the callback modifications happen only when we actually send the message. 2. There was an implicit assumption in the send_sync_message code is that the callbacks object passed in is a new object unique to this message, i.e., we aren't modifying a global object, that then we'll modify again later. I think assumption 2 is sometimes not true, so this guards against it by making a (2-deep) copy of the callbacks object before modifying and using it.
- Loading branch information