Process events when destroying CoreNetwork
During shutdown, process events in CoreNetwork, and wait for the
socket to disconnect. This fixes the QUIT command not getting sent
to IRC networks.
Examples
[Unreal 3.2]
> Before
<-- dcircuit_dev (quasseldev@hostmask.IP) has quit (Input/output error)
> After
<-- dcircuit_dev (quasseldev@hostmask.IP) has quit (Quit: My Message!)
[Freenode]
> Before
<-- dcircuit_dev (~quasselde@hostmask) has quit (Remote host closed the connection)
> After
<-- dcircuit_dev (~quasselde@hostmask) has quit (Quit: My Message!)
Where "My Message!" is specified in Configure Quassel -> IRC
-> Identities -> Advanced -> Quit Reason
Note: Freenode hides quit messages from clients that disconnect soon
after connecting. Stay connected ~10 minutes before testing QUIT.