Skip to content

Commit 3792148

Browse files
Mono may throw a SocketException on IPv6-enabled OS'es when connecting to an IPv4 address
Originally by Ricardo J. Méndez. Fixes #24: #24
1 parent 71fda57 commit 3792148

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

projects/client/RabbitMQ.Client/src/client/impl/SocketFrameHandler_0_9.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ public SocketFrameHandler_0_9(AmqpTcpEndpoint endpoint,
8080
{
8181
m_socket = null;
8282
}
83+
// Mono might raise a SocketException when using IPv4 addresses on
84+
// an OS that supports IPv6
85+
catch (SocketException)
86+
{
87+
m_socket = null;
88+
}
8389
}
8490
if (m_socket == null)
8591
{

0 commit comments

Comments
 (0)