mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-23 01:22:37 +03:00
_libssh2_wait_socket: poll needs milliseconds
As reported on the mailing list, the code path using poll() should multiple seconds with 1000 to get milliseconds, not divide! Reported by: Jan Van Boghout
This commit is contained in:
@@ -564,7 +564,8 @@ int _libssh2_wait_socket(LIBSSH2_SESSION *session)
|
||||
if(dir & LIBSSH2_SESSION_BLOCK_OUTBOUND)
|
||||
sockets[0].events |= POLLOUT;
|
||||
|
||||
rc = poll(sockets, 1, seconds_to_next ? seconds_to_next / 1000 : -1);
|
||||
rc = poll(sockets, 1, seconds_to_next ?
|
||||
seconds_to_next * 1000 : -1);
|
||||
#else
|
||||
fd_set rfd;
|
||||
fd_set wfd;
|
||||
|
||||
Reference in New Issue
Block a user