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:
commit
a81a37399b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user