mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-09 17:26:08 +00:00
Inform the host of disconnect immediately so it can clean up properly
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user