listener: unlock lev on error in listener_read_cb()

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: #341
Fixes: listener/error_unlock
This commit is contained in:
Azat Khuzhin 2016-03-31 20:45:47 +03:00
parent 7d85651694
commit 2a71b33233

View File

@ -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);
}
}