Commit c91bf256 authored by Dhammika Pathirana's avatar Dhammika Pathirana Committed by Martin Sustrik

Fix handle connection reset during session init

Patch to handle nmap version probes.
Signed-off-by: 's avatarDhammika Pathirana <dhammika@gmail.com>
parent 56bdba59
......@@ -91,6 +91,10 @@ namespace zmq
// bytes actually processed.
inline size_t process_buffer (unsigned char *data_, size_t size_)
{
// Check if we had an error in previous attempt.
if (unlikely (!(static_cast <T*> (this)->next)))
return (size_t) -1;
// In case of zero-copy simply adjust the pointers, no copying
// is required. Also, run the state machine in case all the data
// were processed.
......
......@@ -151,7 +151,7 @@ void zmq::zmq_engine_t::in_event ()
inout->flush ();
}
if (disconnection)
if (inout && disconnection)
error ();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment