Inform the host of disconnect immediately so it can clean up properly
This commit is contained in:
parent
ed134f07d3
commit
77b277d05e
1 changed files with 3 additions and 1 deletions
|
|
@ -582,7 +582,9 @@ int stopControlStream(void) {
|
|||
PltCloseThread(&invalidateRefFramesThread);
|
||||
|
||||
if (peer != NULL) {
|
||||
enet_peer_reset(peer);
|
||||
// We use enet_peer_disconnect_now() so the host knows immediately
|
||||
// of our termination and can cleanup properly for reconnection.
|
||||
enet_peer_disconnect_now(peer, 0);
|
||||
peer = NULL;
|
||||
}
|
||||
if (client != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue