mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Send a best-effort disconnect event to let GFE know that we're gone. This increases reconnect reliability.
This commit is contained in:
parent
3966d7ca82
commit
c42cae333d
@ -524,7 +524,7 @@ int stopControlStream(void) {
|
||||
PltSetEvent(&invalidateRefFramesEvent);
|
||||
|
||||
if (peer != NULL) {
|
||||
enet_peer_reset(peer);
|
||||
enet_peer_disconnect_now(peer, 0);
|
||||
}
|
||||
|
||||
if (ctlSock != INVALID_SOCKET) {
|
||||
|
@ -281,7 +281,7 @@ void terminateRtspHandshake(void) {
|
||||
}
|
||||
|
||||
if (peer != NULL) {
|
||||
enet_peer_reset(peer);
|
||||
enet_peer_disconnect_now(peer, 0);
|
||||
peer = NULL;
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ int performRtspHandshake(void) {
|
||||
// Cleanup the ENet stuff
|
||||
if (ServerMajorVersion >= 5) {
|
||||
if (peer != NULL) {
|
||||
enet_peer_reset(peer);
|
||||
enet_peer_disconnect_now(peer, 0);
|
||||
peer = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user