Details
Description
When attempting to connect the TCP socket in TcpTransportFactory.cs in the ```DoConnect(host, port, localAddress, localPort)``` proc if all attempts to call
```TryConnectSocket(ipaddress, port, localAddress, localPort)```
are unsucessful ( resulting in socket == null) at line 375 a
```throw new SocketException();```
is generated.
Since this SocketException has not message in it, it is then caught in turn at line 380 and repackaged as
```throw new NMSConnectionException(String.Format("Error connecting to
:
{1}.", host, port), ex);```
Unfortunately when a SocketException is thrown with no default error message, the inner exception text shows as "The operation completed successfully" for any client consuming application.
I recommend that we give back some more meaningful and relevant information.
```InnerException:
ErrorCode=0
HResult=-2147467259
Message=The operation completed successfully
NativeErrorCode=0
Source=Apache.NMS.ActiveMQ
StackTrace:
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.DoConnect(String host, Int32 port, String localAddress, Int32 localPort)
```