Ticket #66 (closed defect)
SSH disconnect detection
|Reported by:||gmiller1018||Owned by:|
When using libssh2_poll with a INT max timeout and a socket disconnects there does not seem to be any response. I had expected the libssh2_poll to return with the appropriate status indication.
Status passed in as:
cur_fd->fd.channel = sess_flags[I].channel; channel
cur_fd->type = LIBSSH2_POLLFD_CHANNEL;
cur_fd->events = LIBSSH2_POLLFD_POLLIN |
twait = INT_MAX; wait forever for input or disconn.
Log_debug("Waiting in libssh2_poll");
nfound = libssh2_poll (ssh_fds, count, twait);
there is only one socket open at the time and count is
set to 1 (in a select I would use 2). I am unsure if there is some behavior or other issue I need to consider to make this work. In past version of the library this worked but I had customized the code because of blocking behavior. This is pure latest release running on Fedora 7 using the RPM's. The connect and read and write appears to work correctly in general use but if the remote system server crashes the disconnect is not signaled so I never try to re-connect.
The socket have been set to non blocking by:
0); make nonblocking