[ 
https://issues.apache.org/jira/browse/QPID-1207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618734#action_12618734
 ] 

Rafael H. Schloming commented on QPID-1207:
-------------------------------------------

I am working on fix for this now. The issue is due to an annoying artifact of 
the java socket API. If you do a socket.close() from one thread while another 
thread is reading from the input stream, the other thread does not in fact get 
a (-1) for EOF as I expected, but rather throws an exception. You need to use 
shutdownInput() and wait for the other thread to exit before calling 
socket.close().

> 0-10 client throws runtime exceptions when talking to a 0-9 broker
> ------------------------------------------------------------------
>
>                 Key: QPID-1207
>                 URL: https://issues.apache.org/jira/browse/QPID-1207
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3
>            Reporter: Aidan Skinner
>            Assignee: Rafael H. Schloming
>            Priority: Critical
>             Fix For: M3
>
>
> The 0-10 Client transport layer does not signal that the socket should be 
> closed anthe IoRecieve thread should terminate. It is forcibly killed with an 
> IoException when the socket is shutdown.
> Exception in thread "IoReceive - localhost/127.0.0.1:5672" 
> java.lang.RuntimeException: connection closed
>         at org.apache.qpid.nclient.Client$1.exception(Client.java:96)
>         at org.apache.qpid.transport.Connection.exception(Connection.java:148)
>         at 
> org.apache.qpid.transport.network.Assembler.exception(Assembler.java:112)
>         at 
> org.apache.qpid.transport.network.InputHandler.exception(InputHandler.java:196)
>         at 
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:87)
> Caused by: org.apache.qpid.transport.TransportException: error in read thread
>         ... 1 more
> Caused by: java.net.SocketException: Socket closed
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at 
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:70)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to