Some debug logging
This commit is contained in:
parent
25dbedd792
commit
83500b8b86
@ -204,6 +204,8 @@ void RemoteConnection_updateListner()
|
|||||||
if (RemoteConnection_connected())
|
if (RemoteConnection_connected())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
rlog(R_INFO, "%d\n", s_socket);
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(s_serverSocket, &fds);
|
FD_SET(s_serverSocket, &fds);
|
||||||
|
|
||||||
@ -242,6 +244,8 @@ void RemoteConnection_disconnect()
|
|||||||
#endif
|
#endif
|
||||||
s_socket = INVALID_SOCKET;
|
s_socket = INVALID_SOCKET;
|
||||||
|
|
||||||
|
rlog(R_INFO, "disconnect!\n");
|
||||||
|
|
||||||
memset(s_nameLookup.ids, -1, sizeof(int) * s_nameLookup.count);
|
memset(s_nameLookup.ids, -1, sizeof(int) * s_nameLookup.count);
|
||||||
s_nameLookup.count = 0;
|
s_nameLookup.count = 0;
|
||||||
}
|
}
|
||||||
@ -257,8 +261,9 @@ bool RemoteConnection_recv(char* buffer, size_t length, int flags)
|
|||||||
|
|
||||||
if ((ret = recv(s_socket, buffer, (int)length, flags)) != (int)length)
|
if ((ret = recv(s_socket, buffer, (int)length, flags)) != (int)length)
|
||||||
{
|
{
|
||||||
RemoteConnection_disconnect();
|
//rlog(R_INFO, "%d %d\n", ret, length);
|
||||||
return false;
|
//RemoteConnection_disconnect();
|
||||||
|
//return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user