mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
Merge pull request #2122 from gena-moscow/master
Problem: Pub socket crashes on client disconnect.
This commit is contained in:
commit
55244935c2
@ -309,29 +309,28 @@ void zmq::select_t::loop ()
|
|||||||
|
|
||||||
// Size is cached to avoid iteration through recently added descriptors.
|
// Size is cached to avoid iteration through recently added descriptors.
|
||||||
for (fd_entries_t::size_type i = 0, size = family_entry.fd_entries.size (); i < size && rc > 0; ++i) {
|
for (fd_entries_t::size_type i = 0, size = family_entry.fd_entries.size (); i < size && rc > 0; ++i) {
|
||||||
fd_entry_t fd_entry = family_entry.fd_entries [i];
|
|
||||||
|
|
||||||
if (fd_entry.fd == retired_fd)
|
if (family_entry.fd_entries[i].fd == retired_fd)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (FD_ISSET (fd_entry.fd, &local_fds_set.read)) {
|
if (FD_ISSET(family_entry.fd_entries[i].fd, &local_fds_set.read)) {
|
||||||
fd_entry.events->in_event ();
|
family_entry.fd_entries[i].events->in_event();
|
||||||
--rc;
|
--rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd_entry.fd == retired_fd || rc == 0)
|
if (family_entry.fd_entries[i].fd == retired_fd || rc == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (FD_ISSET (fd_entry.fd, &local_fds_set.write)) {
|
if (FD_ISSET(family_entry.fd_entries[i].fd, &local_fds_set.write)) {
|
||||||
fd_entry.events->out_event ();
|
family_entry.fd_entries[i].events->out_event();
|
||||||
--rc;
|
--rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd_entry.fd == retired_fd || rc == 0)
|
if (family_entry.fd_entries[i].fd == retired_fd || rc == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (FD_ISSET (fd_entry.fd, &local_fds_set.error)) {
|
if (FD_ISSET(family_entry.fd_entries[i].fd, &local_fds_set.error)) {
|
||||||
fd_entry.events->in_event ();
|
family_entry.fd_entries[i].events->in_event();
|
||||||
--rc;
|
--rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user