0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-31 01:43:02 +08:00

Merge branch 'maint'

* maint:
  Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL
This commit is contained in:
Martin Sustrik 2010-09-01 18:42:15 +02:00
commit a81a37399b

View File

@ -217,10 +217,13 @@ void zmq::select_t::loop ()
// Destroy retired event sources.
if (retired) {
for (fd_set_t::size_type i = 0; i < fds.size (); i ++) {
if (fds [i].fd == retired_fd) {
fds.erase (fds.begin () + i);
i --;
fd_set_t::iterator it = fds.begin();
while (it != fds.end()) {
if (it->fd == retired_fd) {
it = fds.erase(it);
}
else {
it++;
}
}
retired = false;