Skip to content

Commit

Permalink
Terminate loop if connect condition returns an end iterator.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Sep 11, 2016
1 parent 54c9424 commit 864ca38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/boost/asio/impl/connect.hpp
Expand Up @@ -123,6 +123,8 @@ Iterator connect(basic_socket<Protocol, SocketService>& s,
if (!ec)
return iter;
}
else
break;
}

if (!ec)
Expand Down

0 comments on commit 864ca38

Please sign in to comment.