summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-09-21 22:23:36 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-09-22 01:40:58 +0200
commit479d4fb7413b2f824ed95d3ac91289e8e8e3cfbd (patch)
treed3b288aa016d4a266c98a9a486dcde0ef75eac4d
parenta15db2d2b6e8fd799c0f021f7f6c99ede0e9677b (diff)
Detect POLLERR revents too in NetSocketPosix.
Usually indicate an RST was received by a TCP socket.
-rw-r--r--drivers/unix/net_socket_posix.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index 1d82442d58..07548ab91f 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/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;