Skip to content

Commit 32c4bf0

Browse files
committed
pop_back on failure
1 parent 4dff4d7 commit 32c4bf0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cereal/messaging/msgq_to_zmq.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void MsgqToZmq::run(const std::vector<std::string> &endpoints, const std::string
3232
int ret = socket_pair.pub_sock->connect(zmq_context.get(), endpoint);
3333
if (ret != 0) {
3434
printf("Failed to create ZMQ publisher for [%s]: %s\n", endpoint.c_str(), zmq_strerror(zmq_errno()));
35+
socket_pairs.pop_back(); // Roll back on failure
3536
return;
3637
}
3738
}

0 commit comments

Comments
 (0)