mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +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:
@@ -524,7 +524,7 @@ int stopControlStream(void) {
|
|||||||
PltSetEvent(&invalidateRefFramesEvent);
|
PltSetEvent(&invalidateRefFramesEvent);
|
||||||
|
|
||||||
if (peer != NULL) {
|
if (peer != NULL) {
|
||||||
enet_peer_reset(peer);
|
enet_peer_disconnect_now(peer, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctlSock != INVALID_SOCKET) {
|
if (ctlSock != INVALID_SOCKET) {
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ void terminateRtspHandshake(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (peer != NULL) {
|
if (peer != NULL) {
|
||||||
enet_peer_reset(peer);
|
enet_peer_disconnect_now(peer, 0);
|
||||||
peer = NULL;
|
peer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -626,7 +626,7 @@ int performRtspHandshake(void) {
|
|||||||
// Cleanup the ENet stuff
|
// Cleanup the ENet stuff
|
||||||
if (ServerMajorVersion >= 5) {
|
if (ServerMajorVersion >= 5) {
|
||||||
if (peer != NULL) {
|
if (peer != NULL) {
|
||||||
enet_peer_reset(peer);
|
enet_peer_disconnect_now(peer, 0);
|
||||||
peer = NULL;
|
peer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user