Disallow backlog==0 in evconnlistener_new_bind().

svn:r1300
This commit is contained in:
Nick Mathewson 2009-05-21 20:59:09 +00:00
parent 8997f234f2
commit 7e3ea82ee6

View File

@ -94,6 +94,8 @@ evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb, void *ptr
int on = 1;
int family = sa ? sa->sa_family : AF_UNSPEC;
if (backlog == 0)
return NULL;
fd = socket(family, SOCK_STREAM, 0);
if (fd == -1)
return NULL;