Pass SonarState into SonarWebSocketImpl

Summary: Allowing the connection code to update trigger diagnostic events

Reviewed By: passy

Differential Revision: D9117507

fbshipit-source-id: 24eeb1f80109f89137a7333e04039c3ae9dc3e71
This commit is contained in:
John Knox
2018-08-03 07:34:42 -07:00
committed by Facebook Github Bot
parent 3237b60ff1
commit c7858c62f7
5 changed files with 25 additions and 21 deletions

View File

@@ -91,8 +91,8 @@ class Responder : public rsocket::RSocketResponder {
}
};
SonarWebSocketImpl::SonarWebSocketImpl(SonarInitConfig config)
: deviceData_(config.deviceData), sonarEventBase_(config.callbackWorker), connectionEventBase_(config.connectionWorker) {}
SonarWebSocketImpl::SonarWebSocketImpl(SonarInitConfig config, std::shared_ptr<SonarState> state)
: deviceData_(config.deviceData), sonarState_(state), sonarEventBase_(config.callbackWorker), connectionEventBase_(config.connectionWorker) {}
SonarWebSocketImpl::~SonarWebSocketImpl() {
stop();