You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2018/10/30 15:02:07 UTC

[jira] [Commented] (PROTON-1938) misaligned Transport set/getErrorCondition and closed() behaviour

    [ 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 sreeramg@microsoft.com...



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

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