lws-vhost-destroy
[platform/upstream/libwebsockets.git] / lib / ssl-server.c
index 873ad04..ea87ee5 100644 (file)
@@ -160,7 +160,7 @@ lws_ssl_server_name_cb(SSL *ssl, int *ad, void *arg)
         */
        vh = context->vhost_list;
        while (vh) {
-               if (vh->ssl_ctx == SSL_get_SSL_CTX(ssl))
+               if (!vh->being_destroyed && vh->ssl_ctx == SSL_get_SSL_CTX(ssl))
                        break;
                vh = vh->vhost_next;
        }