Skip to content

Commit

Permalink
Review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikez committed Feb 22, 2024
1 parent 0ffa665 commit 8eb113a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ocpp/common/websocket/websocket_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ void WebsocketBase::disconnect(websocketpp::close::status::value code) {
EVLOG_error << "Cannot disconnect a websocket that was not initialized";
return;
}
if (code == websocketpp::close::status::normal) {
this->shutting_down = true;
}

{
std::lock_guard<std::mutex> lk(this->reconnect_mutex);
if (code == websocketpp::close::status::normal) {
this->shutting_down = true;
}

if (this->reconnect_timer) {
this->reconnect_timer.get()->cancel();
}
Expand Down

0 comments on commit 8eb113a

Please sign in to comment.