Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions zmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ static int php_zmq_context_list_entry(void)
static void php_zmq_context_destroy(php_zmq_context *context)
{
if (context->pid == getpid()) {
if (php_zmq_context_socket_count_get(context) > 0) {
php_error_docref(NULL, E_WARNING, "php_zmq_context_socket_count_get() > 0, will cause infinite hang on zmq_term, unset all zmqsocket references manually eg. via shutdown func");
}
(void) zmq_term(context->z_ctx);
}
pefree(context, context->is_persistent);
Expand Down