mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 20:59:47 +01:00
Fix handle connection reset during session init
Patch to handle nmap version probes. Signed-off-by: Dhammika Pathirana <dhammika@gmail.com>
This commit is contained in:
committed by
Martin Sustrik
parent
56bdba592c
commit
c91bf25645
@@ -91,6 +91,10 @@ namespace zmq
|
|||||||
// bytes actually processed.
|
// bytes actually processed.
|
||||||
inline size_t process_buffer (unsigned char *data_, size_t size_)
|
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
|
// In case of zero-copy simply adjust the pointers, no copying
|
||||||
// is required. Also, run the state machine in case all the data
|
// is required. Also, run the state machine in case all the data
|
||||||
// were processed.
|
// were processed.
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ void zmq::zmq_engine_t::in_event ()
|
|||||||
inout->flush ();
|
inout->flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disconnection)
|
if (inout && disconnection)
|
||||||
error ();
|
error ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user