mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-18 10:59:45 +00:00
Fix #441
This commit is contained in:
1 parent
4cbd113d01
commit
2e63b5a5e5
1 file changed
+6
@@ -5091,6 +5091,12 @@ void mg_copy_listeners(struct mg_server *s, struct mg_server *to) {
|
||||
if ((c->flags & NSF_LISTENING) &&
|
||||
(tmp = (struct ns_connection *) NS_MALLOC(sizeof(*tmp))) != NULL) {
|
||||
memcpy(tmp, c, sizeof(*tmp));
|
||||
|
||||
#ifdef NS_ENABLE_SSL
|
||||
/* See https://github.com/cesanta/mongoose/issues/441 */
|
||||
if (tmp->ssl_ctx != NULL) (SSL_CTX *) tmp->ssl_ctx->references++;
|
||||
#endif
|
||||
|
||||
tmp->mgr = &to->ns_mgr;
|
||||
ns_add_conn(tmp->mgr, tmp);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user