Fix error value on control stream and RTSP handshake failure

This commit is contained in:
Cameron Gutman 2019-11-02 21:28:05 -07:00
parent dca2205ac8
commit 25528671d2
3 changed files with 3 additions and 2 deletions

View File

@ -818,7 +818,7 @@ int startControlStream(void) {
peer = NULL;
enet_host_destroy(client);
client = NULL;
return -1;
return ETIMEDOUT;
}
// Ensure the connect verify ACK is sent immediately

View File

@ -243,7 +243,7 @@ SOCKET connectTcpSocket(struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen,
// select() timed out
Limelog("select() timed out after %d seconds\n", timeoutSec);
closeSocket(s);
SetLastSocketError(EWOULDBLOCK);
SetLastSocketError(ETIMEDOUT);
return INVALID_SOCKET;
}
else if (FD_ISSET(s, &writefds) || FD_ISSET(s, &exceptfds)) {

View File

@ -13,6 +13,7 @@
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EAGAIN WSAEWOULDBLOCK
#define EINTR WSAEINTR
#define ETIMEDOUT WSAETIMEDOUT
typedef int SOCK_RET;
typedef int SOCKADDR_LEN;