vert-x3 / vertx-proton

Apache License 2.0
26 stars 26 forks source link

New handler on ProtonConnection for the OPENED state #124

Closed ozangunalp closed 3 years ago

ozangunalp commented 3 years ago

Motivation:

During peer connection, if the server sends Open frame eagerly, without waiting on the client's Open frame, the openHandler on the client connection misses it and will never be called. This change adds a "openedHandler" to the ProtonConnection which is fired only when an Open frame is received and an Open frame is sent.

cescoffier commented 3 years ago

@gemmellr That's the issue we discussed by email (open frames)

gemmellr commented 3 years ago

Yep. I dont like this change. I dont think we need a new API, and certainly not one that semi duplicates the existing one.

I have identified the cause of the actual issue and am working on an alternative to simply fix the bug making the existing API not handle it as expected.

gemmellr commented 3 years ago

I raised #125 and pushed the change in after giving things a bit more of a look, if you want to give it a try out you can get it from the source or the deployed snapshots.

ozangunalp commented 3 years ago

@gemmellr thanks for this. I tested it and it works as expected.