diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-03-05 04:19:42 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-03-05 04:19:42 +0100 |
commit | bcf25eb9180a4ce17b44a8ae06a5e36446471668 (patch) | |
tree | a7213fa48c4804e506caa0030a67e0890b7320b3 /src | |
parent | 1b5d45cec7233fd82f26ac4bc7f5f44886aabe59 (diff) | |
download | blogc-bcf25eb9180a4ce17b44a8ae06a5e36446471668.tar.gz blogc-bcf25eb9180a4ce17b44a8ae06a5e36446471668.tar.bz2 blogc-bcf25eb9180a4ce17b44a8ae06a5e36446471668.zip |
runserver: close socket if skipped
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc-runserver/httpd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c index 4afb2b8..1c20d43 100644 --- a/src/blogc-runserver/httpd.c +++ b/src/blogc-runserver/httpd.c @@ -272,6 +272,7 @@ br_httpd_run(const char *host, const char *port, const char *docroot, } int value = 1; if (0 > setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(int))) { + close(server_socket); continue; } if (0 == bind(server_socket, rp->ai_addr, rp->ai_addrlen)) { |