1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-08-18 22:07:11 +02:00

Update ZMQ to current git.

This commit is contained in:
Sandu Liviu Catalin
2021-08-22 20:09:16 +03:00
parent b78b3e8ede
commit fa4644d00f
72 changed files with 1309 additions and 884 deletions

View File

@@ -272,6 +272,12 @@ void zmq::xpub_t::xpipe_terminated (pipe_t *pipe_)
// care of by the manual call above. subscriptions is the real mtrie,
// so the pipe must be removed from there or it will be left over.
_subscriptions.rm (pipe_, stub, static_cast<void *> (NULL), false);
// In case the pipe is currently set as last we must clear it to prevent
// subscriptions from being re-added.
if (pipe_ == _last_pipe) {
_last_pipe = NULL;
}
} else {
// Remove the pipe from the trie. If there are topics that nobody
// is interested in anymore, send corresponding unsubscriptions
@@ -348,6 +354,12 @@ int zmq::xpub_t::xrecv (msg_t *msg_)
if (_manual && !_pending_pipes.empty ()) {
_last_pipe = _pending_pipes.front ();
_pending_pipes.pop_front ();
// If the distributor doesn't know about this pipe it must have already
// been terminated and thus we can't allow manual subscriptions.
if (_last_pipe != NULL && !_dist.has_pipe (_last_pipe)) {
_last_pipe = NULL;
}
}
int rc = msg_->close ();