sacOO7 / socketcluster-client-java

Native java and android client for socketcluster framework in node.js
http://socketcluster.io/
Apache License 2.0
94 stars 43 forks source link

Avoid creating new socket every time on connectAsync #40

Open angelix opened 6 years ago

angelix commented 6 years ago

For every call to connect/connectAsync there is a new ws socket created, leaving the previous one connected but orphaned. This PR, allow only one instance of Socket to be actively connected at any time.

sacOO7 commented 6 years ago

Hi @angelix , I am not sure if it creates new connection everytime.... I am sure, it will close the previous socket (The reason why new one is created). Still, will look into it. Thank you for the PR.

angelix commented 6 years ago

My server had a new connection for every connectAsync from the client. If you take a look at the code, it just replace ws with new Socket every time. Thanks @sacOO7

sacOO7 commented 6 years ago

Hey, will be looking into it. Little busy those days ...

angelix commented 6 years ago

Did you have the time to test this @sacOO7 ? Thanks

angelix commented 6 years ago

Hi @sacOO7 , When can you release a new version of the lib with the fixes? Thanks

angelix commented 5 years ago

Hi @sacOO7 , When can you release a new version of the lib with the fixes? Thanks

angelix commented 5 years ago

Hi @sacOO7 It's being over 6 months for this PR to get merged or release a new version. Do you need any help?

angelix commented 5 years ago

@sacOO7 ? :(

sacOO7 commented 4 years ago

Hey @angelix , will be looking into this