mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 07:58:14 +08:00
fix case when zmq_poller access a dead socket
This commit is contained in:
parent
714988e6c5
commit
6bbca7cf4a
@ -47,7 +47,7 @@ zmq::socket_poller_t::~socket_poller_t ()
|
|||||||
tag = 0xdeadbeef;
|
tag = 0xdeadbeef;
|
||||||
|
|
||||||
for (items_t::iterator it = items.begin(); it != items.end(); ++it) {
|
for (items_t::iterator it = items.begin(); it != items.end(); ++it) {
|
||||||
if (it->socket) {
|
if (it->socket && it->socket->check_tag()) {
|
||||||
int thread_safe;
|
int thread_safe;
|
||||||
size_t thread_safe_size = sizeof(int);
|
size_t thread_safe_size = sizeof(int);
|
||||||
|
|
||||||
@ -648,5 +648,3 @@ int zmq::socket_poller_t::wait (zmq::socket_poller_t::event_t *event_, long time
|
|||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user