Skip to content

Commit 8eb113a

Browse files
committed
Review comments.
1 parent 0ffa665 commit 8eb113a

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
@@ -74,12 +74,13 @@ void WebsocketBase::disconnect(websocketpp::close::status::value code) {
7474
EVLOG_error << "Cannot disconnect a websocket that was not initialized";
7575
return;
7676
}
77-
if (code == websocketpp::close::status::normal) {
78-
this->shutting_down = true;
79-
}
8077

8178
{
8279
std::lock_guard<std::mutex> lk(this->reconnect_mutex);
80+
if (code == websocketpp::close::status::normal) {
81+
this->shutting_down = true;
82+
}
83+
8384
if (this->reconnect_timer) {
8485
this->reconnect_timer.get()->cancel();
8586
}

0 commit comments

Comments
 (0)