Fix segfault in c++ producer
The sendTimer_ may not be initialized if connection doesn't come up
correctly.
@@ -673,7 +673,9 @@ void ProducerImpl::start() { HandlerBase::start(); }
void ProducerImpl::shutdown() {
Lock lock(mutex_);
state_ = Closed;
+ if (sendTimer_) {
sendTimer_->cancel();
+ }
producerCreatedPromise_.setFailed(ResultAlreadyClosed);
}
