client: avoid assert() with invalid forceServer

op->chan may not be set if Channel::build() throws.
eg. if forced server name is invalid for connect().
This commit is contained in:
Michael Davidsaver
2023-09-07 14:06:09 +02:00
parent 3eea56fbc9
commit f20d958c46
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -848,8 +848,8 @@ std::shared_ptr<Subscription> MonitorBuilder::exec()
// on worker
// ordering of dispatch()/call() ensures creation before destruction
assert(op->chan);
op->_cancel(true);
if(op->chan)
op->_cancel(true);
}, std::move(temp)));
});