Handle MG_EV_CLOSE in examples

PUBLISHED_FROM=57c62a4123a54ecb455dbf91f3fe562fb0cf2ec2
This commit is contained in:
Alexander Alashkin authored and Cesanta Bot committed 2016-11-01 08:58:38 +00:00
1 parent e99088348d
commit e62dc8f3b2
5 files changed
+34 -5

No files matched your search

+3 -1
View File
@@ -22,7 +22,9 @@ static void ev_handler(struct mg_connection *c, int ev, void *p) {
fwrite(hm->message.p, 1, hm->message.len, stdout);
putchar('\n');
exit_flag = 1;
}
} else if (ev == MG_EV_CLOSE) {
exit_flag = 1;
};
}
int main(void) {