Skip to content

Commit 0491e6b

Browse files
committed
kqueue: Support EV_EOF and EV_ERROR
1 parent 51a31ba commit 0491e6b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/mux_kqueue.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ int mux_kqueue__handle(void)
185185
for(int i=0; i<event_count; i++){
186186
context = event_list[i].udata;
187187
if(context->ident == id_client){
188+
if(event_list[i].flags & (EV_EOF | EV_ERROR)){
189+
do_disconnect(context, MOSQ_ERR_CONN_LOST);
190+
continue;
191+
}
188192
loop_handle_reads_writes(context, event_list[i].filter);
189193
}else if(context->ident == id_listener){
190194
listensock = event_list[i].udata;

0 commit comments

Comments
 (0)