SocketImpl: fix success path by setting NoError

Initialize the error to SocketError::NoError in case of success.

Otherwise, the error wasn't initialized in the success path for the
socket poller, and it was reaching an unknown error because of that.
This commit is contained in:
Alexandre Janniaux
2022-03-20 14:18:01 +01:00
committed by Jérôme Leclercq
parent a541d44d03
commit e5ec90a6f9

View File

@@ -395,6 +395,9 @@ namespace Nz
return 0; return 0;
} }
if (error)
*error = SocketError::NoError;
return static_cast<unsigned int>(result); return static_cast<unsigned int>(result);
} }