Skip to content
Snippets Groups Projects
Commit 41b4c86a authored by alexander.lysikov's avatar alexander.lysikov
Browse files

fixed looping when connection is broken

parent 8ed6c9de
No related branches found
No related tags found
1 merge request!9Feature 2792
...@@ -332,6 +332,14 @@ static void *thread_worker_function( void *arg ) ...@@ -332,6 +332,14 @@ static void *thread_worker_function( void *arg )
continue; continue;
} }
//connection already closed (EPOLLHUP - shutdown has been made in both directions)
if(events[n].events & EPOLLHUP && events[n].events & EPOLLERR) {
log_it( L_DEBUG,"Socket error (EPOLLHUP): 0x%x",events[n].events );
if(events[n].events & ~(EPOLLIN | EPOLLOUT))
cur->no_close = false;
cur->flags |= DAP_SOCK_SIGNAL_CLOSE;
}
if ( events[n].events & EPOLLERR ) { if ( events[n].events & EPOLLERR ) {
log_it( L_ERROR,"Socket error: %s",strerror(errno) ); log_it( L_ERROR,"Socket error: %s",strerror(errno) );
cur->flags |= DAP_SOCK_SIGNAL_CLOSE; cur->flags |= DAP_SOCK_SIGNAL_CLOSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment