Browse Source

Detect POLLERR revents too in NetSocketPosix.

Usually indicate an RST was received by a TCP socket.
Fabio Alessandrelli 7 years ago
parent
commit
479d4fb741
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/unix/net_socket_posix.cpp

+ 1 - 0
drivers/unix/net_socket_posix.cpp

@@ -400,6 +400,7 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const {
 	int ret = ::poll(&pfd, 1, p_timeout);
 
 	ERR_FAIL_COND_V(ret < 0, FAILED);
+	ERR_FAIL_COND_V(pfd.revents & POLLERR, FAILED);
 
 	if (ret == 0)
 		return ERR_BUSY;