mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-29 21:08:24 +00:00
Fix #373
This commit is contained in:
1 parent
6a54704b29
commit
abcea07641
1 file changed
+6
@@ -2712,6 +2712,12 @@ size_t mg_websocket_write(struct mg_connection* conn, int opcode,
|
|||||||
free(copy);
|
free(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we send closing frame, schedule a connection to be closed after
|
||||||
|
// data is drained to the client.
|
||||||
|
if (opcode == WEBSOCKET_OPCODE_CONNECTION_CLOSE) {
|
||||||
|
MG_CONN_2_CONN(conn)->ns_conn->flags |= NSF_FINISHED_SENDING_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
return MG_CONN_2_CONN(conn)->ns_conn->send_iobuf.len;
|
return MG_CONN_2_CONN(conn)->ns_conn->send_iobuf.len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user