mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 14:45:38 +02:00
Problem: code duplication around options_t::conflate
Solution: extract functionality into get_effective_conflate_option
This commit is contained in:
@@ -394,11 +394,7 @@ void zmq::session_base_t::process_attach (i_engine *engine_)
|
||||
object_t *parents[2] = {this, _socket};
|
||||
pipe_t *pipes[2] = {NULL, NULL};
|
||||
|
||||
bool conflate =
|
||||
options.conflate
|
||||
&& (options.type == ZMQ_DEALER || options.type == ZMQ_PULL
|
||||
|| options.type == ZMQ_PUSH || options.type == ZMQ_PUB
|
||||
|| options.type == ZMQ_SUB);
|
||||
const bool conflate = get_effective_conflate_option (options);
|
||||
|
||||
int hwms[2] = {conflate ? -1 : options.rcvhwm,
|
||||
conflate ? -1 : options.sndhwm};
|
||||
|
Reference in New Issue
Block a user