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:
Aaron Brady
2018-08-17 10:06:48 -07:00
committed by Facebook Github Bot
parent 839a579a17
commit e9471c7197

View File

@@ -218,7 +218,9 @@ void SonarWebSocketImpl::reconnect() {
}
void SonarWebSocketImpl::stop() {
if (client_) {
client_->disconnect();
}
client_ = nullptr;
}