aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
526 stars 100 forks source link

Can clients be reused after reactor shutdown? #168

Open 8573 opened 5 years ago

8573 commented 5 years ago

While looking into how I could implement reconnection after ping-timeout in irc-bot, I hit this question. Suppose that—

Can the same sequence of events safely be repeated, registering new clones of the same IrcClients with the same IrcReactor and running the reactor again?

I would guess that, if the reactor shut down because a connection failed, the IrcClient corresponding to that connection no longer would be usable, but what about the other clients running on the same reactor?

I would like to suggest that the answer be documented, covering whether an IrcClient c that was being run on an IrcReactor can be reused thus in the following cases:

I note, largely for the sake of making GitHub create cross-references between these issue tickets, that this seems relevant to tickets #88 and #167.