mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-21 19:51:50 +00:00
Style fixes. Printing error message before fatal error.
This commit is contained in:
1 parent
ab6f145e3e
commit
30fe257691
1 file changed
+4
-2
+4
-2
@@ -369,8 +369,10 @@ int main(void) {
|
|||||||
srand((unsigned) time(0));
|
srand((unsigned) time(0));
|
||||||
|
|
||||||
// Setup and start Mongoose
|
// Setup and start Mongoose
|
||||||
ctx = mg_start(&event_handler, NULL, options);
|
if ((ctx = mg_start(&event_handler, NULL, options)) == NULL) {
|
||||||
assert(ctx != NULL);
|
printf("%s\n", "Cannot start chat server, fatal exit");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
// Wait until enter is pressed, then exit
|
// Wait until enter is pressed, then exit
|
||||||
printf("Chat server started on ports %s, press enter to quit.\n",
|
printf("Chat server started on ports %s, press enter to quit.\n",
|
||||||
|
|||||||
Reference in new issue
Block a user