Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ namespace Common {
private:
zmqpp::context &_context;
zmqpp::socket _socket;
mutable std::mutex _publish_mtx;
Mode _mode; ///< publisher or subscriber?
std::string _topic; ///< publisher topic
std::vector<std::string> _topics; ///< list of subscriber topics
Expand Down Expand Up @@ -179,6 +180,7 @@ namespace Common {
if ( _mode != Mode::PUB ) {
throw std::runtime_error( "(Common::PubSub::publish) not a publisher" );
}
std::lock_guard<std::mutex> lock( _publish_mtx );
zmqpp::message message_zmq;
// Publish to either class default _topic or topic specified as
// optional arg.
Expand Down
Loading