Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client for WebSocket RPC does not work as expected with discovery service #729

Closed
id-regis opened this issue Jun 8, 2016 · 1 comment
Closed

Comments

@id-regis
Copy link

id-regis commented Jun 8, 2016

Hi,

When creating a Client proxy with an associated service discovery, if the service can't be loaded during the build (see: here) a default port (8080) and host (localhost) is used.

On the first attempt to send a websocket message the BoonClient try to open the socket here. But fail to open websocket in Http client as the port and host are incorrect (so vertxWebSocket attribute remain at null which will cause NullPointerException later).

On a second attempt even if the service become available on the default port/host, message can't be send because sendText method is called here without retrying to open the websocket resulting in NullPointerException in HttpVertxClient

What I expect from the proxy client is :

  • At start if the service is not available in service discovery catalog then mark Boon client as not connected, and set port/hostname to null in its Http server proxy client. (then do no accept to send message until service become available)
  • When service become available, Boon client should receive a notify from service discovery
  • In the notify callback port/hostname should be set
  • In Boon Client send method should not call webSocket.sendText(message); if we are not connected, this condition should be changed to allow a retry before trying to send message.

Thanks

@RichardHightower
Copy link
Member

Thanks for the detailed description.
I will take a look.
Feel free to submit a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants