mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Inform the host of disconnect immediately so it can clean up properly
This commit is contained in:
+3
-1
@@ -582,7 +582,9 @@ int stopControlStream(void) {
|
|||||||
PltCloseThread(&invalidateRefFramesThread);
|
PltCloseThread(&invalidateRefFramesThread);
|
||||||
|
|
||||||
if (peer != NULL) {
|
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;
|
peer = NULL;
|
||||||
}
|
}
|
||||||
if (client != NULL) {
|
if (client != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user