[ 
https://issues.apache.org/jira/browse/PROTON-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668833#comment-16668833
 ] 

Robbie Gemmell commented on PROTON-1938:
----------------------------------------

The existing behaviour was a bit more nuanced than described. Calling 
setCondition(ErrorCondition) on the TransportImpl object actually had no 
influence over the ErrorCondition returned from TransportImpl#getCondition() or 
used in certain Close frames at all. It operated on the EndpointImpl superclass 
state whereas the getCondition method was overridden in TransportImpl and only 
operated on a local field in that class which was set inside TransportImpl in 
the closed(TransportException) method, either setting a "connection aborted" 
'framing error' condition if no exception is provided, or a 'framing error' 
with the exception message as its description if an exception was provided.

I have made a different change, removing the extra ErrorCondition field from 
TransportImpl and aligning on use of the parent field used by other objects, 
but retaining as much of the earlier getCondition behaviour of TransportImpl as 
possible/sensible, and ensuring that an ErrorCondition previously set is 
retained in preference to creating a new one when closed(TransportException) is 
called.

> misaligned Transport set/getErrorCondition and closed() behaviour
> -----------------------------------------------------------------
>
>                 Key: PROTON-1938
>                 URL: https://issues.apache.org/jira/browse/PROTON-1938
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: proton-j-0.29.0
>            Reporter: Sreeram Garlapati
>            Priority: Minor
>             Fix For: proton-j-0.30.0
>
>
> Although at various places in proton library - transport.setCondition() was 
> invoked (for ex: IOHandler.java - invokes several places to communicate 
> socket IOExceptions) - this was overwritten in TransportImpl.closed method 
> and shows up as - ConnectionError.FRAMING_ERROR.
> I created this PR: to help easily identify - where the problem was: 
> [https://github.com/apache/qpid-proton-j/pull/16]
> Please let me know if you need more info or have any inputs finishing the PR 
> at sreer...@microsoft.com...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to