[2.1.0] zmq_term deadlocks on Windows

Description

MSVC 2010 optimises out critical test for the packet encoder to exit. This section will never return false:

// Read new message. If there is none, return false.
// Note that new state is set only if write is successful. That way
// unsuccessful write will cause retry on the next state machine
// invocation.
if (!source || !source->read (&in_progress)) {
zmq_msg_init (&in_progress);
return false;
}

Environment

None

Status

Assignee

Unassigned

Reporter

Steven McCoy

Labels

None

Priority