Don't dereference the end iterator when async_connect exhausts the range.
This commit is contained in:
parent
34412f72dd
commit
5b89400ac3
@ -324,7 +324,8 @@ namespace detail
|
||||
}
|
||||
|
||||
handler_(static_cast<const asio::error_code&>(ec),
|
||||
static_cast<const typename Protocol::endpoint&>(*iter));
|
||||
static_cast<const typename Protocol::endpoint&>(
|
||||
ec || iter == end ? typename Protocol::endpoint() : *iter));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user