Skip to content

Commit

Permalink
listener: unlock lev on error in listener_read_cb()
Browse files Browse the repository at this point in the history
Without this patch:
  $ regress --no-fork +listener/error_unlock
  listener/error_unlock: [warn] Error from accept() call: Too many open files
  [err] ../evthread.c:220: Assertion lock->count == 0 failed in ../evthread.c
  Aborted (core dumped)

Fixes: libevent#341
Fixes: listener/error_unlock
  • Loading branch information
azat committed Mar 31, 2016
1 parent 7d85651 commit 2a71b33
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions listener.c
Expand Up @@ -442,6 +442,7 @@ listener_read_cb(evutil_socket_t fd, short what, void *p)
listener_decref_and_unlock(lev);
} else {
event_sock_warn(fd, "Error from accept() call");
UNLOCK(lev);
}
}

Expand Down

0 comments on commit 2a71b33

Please sign in to comment.