remove bytes_to_send == res check.
It seems to cause trouble with mini campaign game creation.
This commit is contained in:
parent
739197df16
commit
33fe7d8a6b
1 changed files with 1 additions and 5 deletions
|
@ -80,8 +80,7 @@ SOCKET_STATE send_buf(TCPsocket sock, std::vector<char>& buf) {
|
|||
if(sockets_locked[sock] != SOCKET_LOCKED)
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
const int bytes_to_send = static_cast<int>(size - upto);
|
||||
const int res = SDLNet_TCP_Send(sock, &buf[upto], bytes_to_send);
|
||||
const int res = SDLNet_TCP_Send(sock, &buf[upto], static_cast<int>(size - upto));
|
||||
|
||||
if(res == -1) {
|
||||
#ifdef EAGAIN
|
||||
|
@ -99,9 +98,6 @@ SOCKET_STATE send_buf(TCPsocket sock, std::vector<char>& buf) {
|
|||
#endif
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
if(res != bytes_to_send) {
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
timeout = 15000;
|
||||
upto += static_cast<size_t>(res);
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue