Commit a81a3739 authored by Martin Sustrik's avatar Martin Sustrik

Merge branch 'maint'

* maint:
  Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL
parents 47aaf102 59315ebd
......@@ -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;
......
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