[ 
https://issues.apache.org/jira/browse/AMQNET-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jim Gomes updated AMQNET-502:
-----------------------------
    Fix Version/s: 1.7.1

> When a SocketException is thrown in DoConnect, invalid exception message is 
> generated
> -------------------------------------------------------------------------------------
>
>                 Key: AMQNET-502
>                 URL: https://issues.apache.org/jira/browse/AMQNET-502
>             Project: ActiveMQ .Net
>          Issue Type: Improvement
>          Components: ActiveMQ
>    Affects Versions: 1.6.4, 1.7.0
>         Environment: Windows Server 2012, Visual Studio 2015
>            Reporter: Matthew Hintzen
>            Priority: Minor
>              Labels: easyfix
>             Fix For: 1.7.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 
> {0}:{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)
> ``` 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to