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;
}
Resolved with 0MQ 2.1.2.