[ https://issues.apache.org/jira/browse/PROTON-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356203#comment-16356203 ]
Andrew Stitcher commented on PROTON-1759: ----------------------------------------- This is an unfortunate API design issue - {{pn_session()}} can in theory return NULL to signal it can't create a new session object. However, it probably isn't illegal just to create a session that isn't mapped. {{pn_session_open()}} is void so cannot return a value - this is probably the point that you wan't to get an error return. The API design issue is that there are multiple pn_xxx_open() API calls and they all return void, they should probably all in this case have a way to return an error. In fact the error doesn't get detected until even later than this when proton-c is trying to process output for this connection, at this point there is no direct correlation with the erroneous action, and it is hard to return an actionable error. > Proton that is, pn_session() or pn_session_open(), has no way to signal an > error if can't allocate a channel > ------------------------------------------------------------------------------------------------------------ > > Key: PROTON-1759 > URL: https://issues.apache.org/jira/browse/PROTON-1759 > Project: Qpid Proton > Issue Type: Bug > Components: proton-c > Reporter: Andrew Stitcher > Priority: Major > Labels: correctness > > If you set the channel_max to 0, signaling that only 1 channel (hence > session) is allowed.but try to open 2 sessions, Proton does not return any > kind of error; > Proton-c will log a message: > {noformat} > [0x555668823f90]:unable to find an open available channel within limit of 0 > [0x555668823f90]:process error -2{noformat} > This is not very helpful! -- 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