1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

Fix "connecting to closed port" on MacosX

This commit is contained in:
Aris Adamantiadis
2011-05-20 15:13:45 +02:00
parent a053d819a3
commit 79434649d0

View File

@@ -226,7 +226,7 @@ int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, socket_t fd, int r
if(!ssh_socket_is_open(s)){
return -1;
}
if(revents & POLLERR){
if(revents & POLLERR || revents & POLLHUP){
/* Check if we are in a connecting state */
if(s->state==SSH_SOCKET_CONNECTING){
s->state=SSH_SOCKET_ERROR;