Skip to content

Commit

Permalink
Use a cross platform sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanMollet committed Sep 27, 2024
1 parent 174eb0d commit 6ac6d16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/impl/tcptransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,7 @@ void TcpTransport::process(PollService::Event event) {
// Allow any received messages to be processed before we shut down and destroy the callbacks
// This should probably be a mutex or check of a queue size or something, but I can't figure out
// what to do that against and a 100ms delay seems to be plenty

usleep(100 * 1000);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
PLOG_INFO << "TCP disconnected";
PollService::Instance().remove(mSock);
changeState(State::Disconnected);
Expand Down

0 comments on commit 6ac6d16

Please sign in to comment.