Skip to content

Commit 2d1cf2f

Browse files
committed
DisplayDriverServer : Create IPv6 endpoint
This avoids delays on Windows, where the ClientDisplayDriver was first trying a V6 connection and then only making a V4 connection if that failed (after a timeout).
1 parent d293bc9 commit 2d1cf2f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Fixes
1010
-----
1111

1212
- CompoundObject : Fixed crashes in Python bindings caused by passing `None` as a key.
13+
- DisplayDriverServer : Fixed delays connecting to the server on Windows.
1314

1415
10.5.4.2 (relative to 10.5.4.1)
1516
========

src/IECoreImage/DisplayDriverServer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class DisplayDriverServer::PrivateData : public RefCounted
175175

176176
void openPort( DisplayDriverServer::Port portNumber )
177177
{
178-
m_endpoint = boost::asio::ip::tcp::endpoint( tcp::v4(), portNumber );
178+
m_endpoint = boost::asio::ip::tcp::endpoint( tcp::v6(), portNumber );
179179
m_acceptor.open( m_endpoint.protocol() );
180180
#ifdef _MSC_VER
181181
m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) );
@@ -184,6 +184,7 @@ class DisplayDriverServer::PrivateData : public RefCounted
184184
#else
185185
m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( true ) );
186186
#endif
187+
m_acceptor.set_option( boost::asio::ip::v6_only( false ) );
187188
m_acceptor.bind( m_endpoint );
188189
m_acceptor.listen();
189190
}

0 commit comments

Comments
 (0)