Detect POLLERR revents too in NetSocketPosix.

Usually indicate an RST was received by a TCP socket.
This commit is contained in:
Fabio Alessandrelli 2018-09-21 22:23:36 +02:00
parent a15db2d2b6
commit 479d4fb741

View file

@ -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;