fix crash if SonarClient is stopped with no connection
Summary: calling SonarClient::instance()->stop() without a connection will try to deref a null client_ Reviewed By: jknoxville Differential Revision: D9325527 fbshipit-source-id: b0a81d6eb9d1375b74cbf10466f947e8a2de3b98
This commit is contained in:
committed by
Facebook Github Bot
parent
839a579a17
commit
e9471c7197
@@ -218,7 +218,9 @@ void SonarWebSocketImpl::reconnect() {
|
||||
}
|
||||
|
||||
void SonarWebSocketImpl::stop() {
|
||||
if (client_) {
|
||||
client_->disconnect();
|
||||
}
|
||||
client_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user