You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you upgrade an Address to a SyncAddress, then drop the SyncAddress, then upgrade the address again, the SyncAddress returned during the 2nd upgrade does not work.
The example program upgrades an address twice, each time sending a message that should be printed. It should print "Handling message!" twice, but it's only printing once.
I believe this is because when the last reference to SyncAddress is dropped, the underlying sender is closed. If you upgrade an address after this, it re-uses the tx/rx from the first one that was already closed.
In my example code, you can uncomment one of the lines which prevents the SyncAddress from being dropped, and the bug goes away.
I'll open a PR for this one. Still need to get more familiar with the code to figure out the best way to solve this one. If you have any ideas that would be helpful.
If you upgrade an
Address
to aSyncAddress
, then drop theSyncAddress
, then upgrade the address again, theSyncAddress
returned during the 2nd upgrade does not work.I was able to create a minimal example showing this bug
https://github.com/fuchsnj/actix_bug/blob/master/src/main.rs
The example program upgrades an address twice, each time sending a message that should be printed. It should print "Handling message!" twice, but it's only printing once.
I believe this is because when the last reference to
SyncAddress
is dropped, the underlying sender is closed. If you upgrade an address after this, it re-uses the tx/rx from the first one that was already closed.In my example code, you can uncomment one of the lines which prevents the
SyncAddress
from being dropped, and the bug goes away.Also, if you comment out the line in actix that closes this sender, the bug also goes away.
https://github.com/actix/actix/blob/master/src/queue/sync.rs#L763
The text was updated successfully, but these errors were encountered: