Skip to content

Commit 45af140

Browse files
authored
Merge pull request #750 from redboltz/fix_invalid_iterator_operation
Fixed #749.
2 parents 1455059 + f659bee commit 45af140

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/mqtt/broker/broker.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,8 @@ class broker {
982982
}
983983
else {
984984
// new connection
985-
it = idx.emplace_hint(
986-
it,
985+
bool inserted;
986+
std::tie(it, inserted) = idx.emplace(
987987
ioc_,
988988
subs_map_,
989989
spep,
@@ -992,6 +992,7 @@ class broker {
992992
force_move(will_expiry_interval),
993993
force_move(session_expiry_interval)
994994
);
995+
BOOST_ASSERT(inserted);
995996
send_connack(false);
996997
}
997998
}

0 commit comments

Comments
 (0)