Do not call setsockopts() on a listening connection

This commit is contained in:
cpq 2021-03-13 12:36:00 +00:00
parent 2594e7b37a
commit 381d7cce54
2 changed files with 0 additions and 2 deletions

View File

@ -3068,7 +3068,6 @@ struct mg_connection *mg_listen(struct mg_mgr *mgr, const char *url,
c->fd = sock2ptr(fd);
c->is_listening = 1;
c->is_udp = is_udp;
setsockopts(c);
LIST_ADD_HEAD(struct mg_connection, &mgr->conns, c);
c->fn = fn;
c->fn_data = fn_data;

View File

@ -477,7 +477,6 @@ struct mg_connection *mg_listen(struct mg_mgr *mgr, const char *url,
c->fd = sock2ptr(fd);
c->is_listening = 1;
c->is_udp = is_udp;
setsockopts(c);
LIST_ADD_HEAD(struct mg_connection, &mgr->conns, c);
c->fn = fn;
c->fn_data = fn_data;