fixed missing urs deactivation upon initialization failure

This commit is contained in:
hyung-hwan 2014-09-16 05:31:28 +00:00
parent 2ca7afd90c
commit 3a30d67411
2 changed files with 3 additions and 1 deletions

View File

@ -1690,12 +1690,14 @@ int qse_httpd_loop (qse_httpd_t* httpd)
if (activate_servers (httpd) <= -1) if (activate_servers (httpd) <= -1)
{ {
if (httpd->dnsactive) deactivate_dns (httpd); if (httpd->dnsactive) deactivate_dns (httpd);
if (httpd->ursactive) deactivate_urs (httpd);
httpd->opt.scb.mux.close (httpd, httpd->mux); httpd->opt.scb.mux.close (httpd, httpd->mux);
return -1; return -1;
} }
if (httpd->server.nactive <= 0) if (httpd->server.nactive <= 0)
{ {
if (httpd->dnsactive) deactivate_dns (httpd); if (httpd->dnsactive) deactivate_dns (httpd);
if (httpd->ursactive) deactivate_urs (httpd);
httpd->opt.scb.mux.close (httpd, httpd->mux); httpd->opt.scb.mux.close (httpd, httpd->mux);
httpd->errnum = QSE_HTTPD_ENOSVR; httpd->errnum = QSE_HTTPD_ENOSVR;