(svn r26046) -Fix: handle a number of failure conditions from methods called in the network code
This commit is contained in:
@@ -237,9 +237,9 @@ bool NetworkTCPSocketHandler::CanSendReceive()
|
||||
|
||||
tv.tv_sec = tv.tv_usec = 0; // don't block at all.
|
||||
#if !defined(__MORPHOS__) && !defined(__AMIGA__)
|
||||
select(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv);
|
||||
if (select(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv) < 0) return false;
|
||||
#else
|
||||
WaitSelect(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv, NULL);
|
||||
if (WaitSelect(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv, NULL) < 0) return false;
|
||||
#endif
|
||||
|
||||
this->writable = !!FD_ISSET(this->sock, &write_fd);
|
||||
|
Reference in New Issue
Block a user