We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31187b9 commit f5029d4Copy full SHA for f5029d4
include/nadjieb/mjpeg_streamer.hpp
@@ -238,7 +238,7 @@ class MJPEGStreamer
238
239
int n;
240
{
241
- std::unique_lock<std::mutex> lock(this->send_mutices_[payload.sd % NUM_SEND_MUTICES]);
+ std::unique_lock<std::mutex> lock(this->send_mutices_.at(payload.sd % NUM_SEND_MUTICES));
242
n = ::write(payload.sd, msg.c_str(), msg.size());
243
}
244
@@ -315,7 +315,7 @@ class MJPEGStreamer
315
316
317
318
- std::unique_lock<std::mutex> lock(this->send_mutices_[new_socket % NUM_SEND_MUTICES]);
+ std::unique_lock<std::mutex> lock(this->send_mutices_.at(new_socket % NUM_SEND_MUTICES));
319
::write(new_socket, header.c_str(), header.size());
320
321
0 commit comments