mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-16 13:50:56 +00:00
Fix error value on control stream and RTSP handshake failure
This commit is contained in:
+1
-1
@@ -818,7 +818,7 @@ int startControlStream(void) {
|
|||||||
peer = NULL;
|
peer = NULL;
|
||||||
enet_host_destroy(client);
|
enet_host_destroy(client);
|
||||||
client = NULL;
|
client = NULL;
|
||||||
return -1;
|
return ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure the connect verify ACK is sent immediately
|
// Ensure the connect verify ACK is sent immediately
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ SOCKET connectTcpSocket(struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen,
|
|||||||
// select() timed out
|
// select() timed out
|
||||||
Limelog("select() timed out after %d seconds\n", timeoutSec);
|
Limelog("select() timed out after %d seconds\n", timeoutSec);
|
||||||
closeSocket(s);
|
closeSocket(s);
|
||||||
SetLastSocketError(EWOULDBLOCK);
|
SetLastSocketError(ETIMEDOUT);
|
||||||
return INVALID_SOCKET;
|
return INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
else if (FD_ISSET(s, &writefds) || FD_ISSET(s, &exceptfds)) {
|
else if (FD_ISSET(s, &writefds) || FD_ISSET(s, &exceptfds)) {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#define EAGAIN WSAEWOULDBLOCK
|
#define EAGAIN WSAEWOULDBLOCK
|
||||||
#define EINTR WSAEINTR
|
#define EINTR WSAEINTR
|
||||||
|
#define ETIMEDOUT WSAETIMEDOUT
|
||||||
|
|
||||||
typedef int SOCK_RET;
|
typedef int SOCK_RET;
|
||||||
typedef int SOCKADDR_LEN;
|
typedef int SOCKADDR_LEN;
|
||||||
|
|||||||
Reference in New Issue
Block a user