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
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue