Skip to content

Commit

Permalink
C++ implementation: Fix segfault due to invalid iterator (#492)
Browse files Browse the repository at this point in the history
### Public-Facing Changes

C++ implementation: Fix segfault due to invalid iterator

### Description
See foxglove/ros-foxglove-bridge#251
  • Loading branch information
achim-k authored Jul 17, 2023
1 parent 3599e26 commit 6e0bfdf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ void Server<ServerConfiguration>::handleUnsubscribe(const nlohmann::json& payloa
ChannelId chanId = sub->first;
_handlers.unsubscribeHandler(chanId, hdl);
std::unique_lock<std::shared_mutex> clientsLock(_clientsMutex);
_clients.at(hdl).subscriptionsByChannel.erase(sub);
_clients.at(hdl).subscriptionsByChannel.erase(chanId);
}
}

Expand Down

0 comments on commit 6e0bfdf

Please sign in to comment.