mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-01 10:57:59 +01:00
Merge pull request #3687 from trya/fix_conflate
Fix behavior of ZMQ_CONFLATE on PUB sockets
This commit is contained in:
commit
4ebe92333e
@ -78,12 +78,12 @@ template <> class dbuffer_t<msg_t>
|
||||
msg_t &xvalue = const_cast<msg_t &> (value_);
|
||||
|
||||
zmq_assert (xvalue.check ());
|
||||
_back->move (xvalue); // cannot just overwrite, might leak
|
||||
*_back = value_;
|
||||
|
||||
zmq_assert (_back->check ());
|
||||
|
||||
if (_sync.try_lock ()) {
|
||||
std::swap (_back, _front);
|
||||
_front->move (*_back);
|
||||
_has_msg = true;
|
||||
|
||||
_sync.unlock ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user