Skip to content

Commit 5214913

Browse files
committed
Review comments.
1 parent 4905c1c commit 5214913

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/ocpp/common/websocket/websocket_base.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ void WebsocketBase::disconnect(websocketpp::close::status::value code) {
7878
EVLOG_error << "Cannot disconnect a websocket that was not initialized";
7979
return;
8080
}
81-
if (code == websocketpp::close::status::normal) {
82-
this->shutting_down = true;
83-
}
8481

8582
{
8683
std::lock_guard<std::mutex> lk(this->reconnect_mutex);
84+
if (code == websocketpp::close::status::normal) {
85+
this->shutting_down = true;
86+
}
87+
8788
if (this->reconnect_timer) {
8889
this->reconnect_timer.get()->cancel();
8990
}

0 commit comments

Comments
 (0)