mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Handle MG_EV_CLOSE in examples
PUBLISHED_FROM=57c62a4123a54ecb455dbf91f3fe562fb0cf2ec2
This commit is contained in:
1 parent
e99088348d
commit
e62dc8f3b2
5 files changed
+34
-5
No files matched your search
@@ -31,6 +31,12 @@ static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
|
||||
putchar('\n');
|
||||
s_exit_flag = 1;
|
||||
break;
|
||||
case MG_EV_CLOSE:
|
||||
if(s_exit_flag == 0) {
|
||||
printf("Server closed connection\n");
|
||||
s_exit_flag = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user