_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:
Daniel Stenberg 2010-07-17 19:20:20 +02:00
parent 992aff7aca
commit 2afa5b2dc2

View File

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