summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/socket_base.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index 5c21b8f..f19187f 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -192,7 +192,8 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
// Specifically, multicast protocols can't be combined with
// bi-directional messaging patterns (socket types).
if ((protocol_ == "pgm" || protocol_ == "epgm") &&
- options.requires_in && options.requires_out) {
+ options.type != ZMQ_PUB && options.type != ZMQ_SUB &&
+ options.type != ZMQ_XPUB && options.type != ZMQ_XSUB) {
errno = ENOCOMPATPROTO;
return -1;
}