Skip to content

Commit ad55a53

Browse files
committed
Fix exit if http server can't start
1 parent 8288839 commit ad55a53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/http_server.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,9 @@ struct data_output *data_output_http_create(struct mg_mgr *mgr, char const *host
12441244
http->output.output_free = data_output_http_free;
12451245

12461246
http->server = http_server_start(mgr, host, port, cfg, &http->output);
1247+
if (!http->server) {
1248+
exit(1);
1249+
}
12471250

12481251
return &http->output;
12491252
}

0 commit comments

Comments
 (0)