From 479d4fb7413b2f824ed95d3ac91289e8e8e3cfbd Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 21 Sep 2018 22:23:36 +0200 Subject: Detect POLLERR revents too in NetSocketPosix. Usually indicate an RST was received by a TCP socket. --- drivers/unix/net_socket_posix.cpp | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3