diff options
Diffstat (limited to 'src/packetSource.cpp')
-rw-r--r-- | src/packetSource.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/packetSource.cpp b/src/packetSource.cpp index fa4abd0..06a7500 100644 --- a/src/packetSource.cpp +++ b/src/packetSource.cpp @@ -79,10 +79,8 @@ void UDPPacketSource::onResolve(PacketSourceResolverIt& it) sock.sock_->open(e.protocol()); #ifndef _MSC_VER - if(e.protocol() == proto::v6()) { - boost::asio::ip::v6_only option(true); - sock.sock_->set_option(option); - } + if(e.protocol() == proto::v6()) + sock.sock_->set_option(boost::asio::ip::v6_only(true)); #endif sock.sock_->bind(e); sockets_.push_back(sock); |