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

how do you close connection? #78

Open
jpodpro opened this issue Apr 3, 2016 · 11 comments
Open

how do you close connection? #78

jpodpro opened this issue Apr 3, 2016 · 11 comments

Comments

@jpodpro
Copy link

jpodpro commented Apr 3, 2016

unless i refresh the page, i get an infinite heartbeat loop. there is no obvious way to stop listening once socket.onConnect has been run.

the log continues to output this until i refresh the page:

debug: emitting heartbeat for client 8Oo3AOzC54cFoAp5_J0D
debug: websocket writing 2::
debug: set heartbeat timeout for client 8Oo3AOzC54cFoAp5_J0D
debug: got heartbeat packet
debug: cleared heartbeat timeout for client 8Oo3AOzC54cFoAp5_J0D
debug: set heartbeat interval for client 8Oo3AOzC54cFoAp5_J0D

@oncesk
Copy link
Owner

oncesk commented Apr 3, 2016

Yep, theris no way to turn off heartbeat

I am do not understand what are you need from the library? How do you use
it?
3 апр. 2016 г. 10:37 пользователь "jpodpro" [email protected]
написал:

unless i refresh the page, i get an infinite heartbeat loop. there is no
obvious way to stop listening once socket.onConnect has been run.

the log continues to output this until i refresh the page:

debug: emitting heartbeat for client 8Oo3AOzC54cFoAp5_J0D
debug: websocket writing 2::
debug: set heartbeat timeout for client 8Oo3AOzC54cFoAp5_J0D
debug: got heartbeat packet
debug: cleared heartbeat timeout for client 8Oo3AOzC54cFoAp5_J0D
debug: set heartbeat interval for client 8Oo3AOzC54cFoAp5_J0D


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#78

@jpodpro
Copy link
Author

jpodpro commented Apr 3, 2016

so once i open a connection to the server i cannot close it? that is terrible!

@oncesk
Copy link
Owner

oncesk commented Apr 3, 2016

No, you can close connection)
3 апр. 2016 г. 10:55 пользователь "jpodpro" [email protected]
написал:

so once i open a connection to the server i cannot close it? that is
terrible!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#78 (comment)

@jpodpro
Copy link
Author

jpodpro commented Apr 3, 2016

why don't you go ahead and just explain how instead of forcing me to beg?

@oncesk
Copy link
Owner

oncesk commented Apr 3, 2016

What are you problem?

@jpodpro
Copy link
Author

jpodpro commented Apr 3, 2016

i already told you! once i call socket.onConnect i cannot close the connection without reloading the page. not an option for a single page app.

@oncesk
Copy link
Owner

oncesk commented Apr 3, 2016

I saw the code and in js no close method for closing connection, but when
you close or reload your browser tab connection will be closed, and opened
again when tab is loaded and new yiinodesocket instance will created

You can add simple method close

You using ipv6 but in your configuration you did not add ipv6 address
3 апр. 2016 г. 11:05 пользователь "jpodpro" [email protected]
написал:

why don't you go ahead and just explain how instead of forcing me to beg?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#78 (comment)

@oncesk
Copy link
Owner

oncesk commented Apr 3, 2016

Just now i added close method

I saw the code and in js no close method for closing connection, but when
you close or reload your browser tab connection will be closed, and opened
again when tab is loaded and new yiinodesocket instance will created

You can add simple method close

You using ipv6 but in your configuration you did not add ipv6 address
3 апр. 2016 г. 11:05 пользователь "jpodpro" [email protected]
написал:

why don't you go ahead and just explain how instead of forcing me to beg?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#78 (comment)

@jpodpro
Copy link
Author

jpodpro commented Apr 3, 2016

Just now i added close method

this is not helpful. reloading page is not a good solution to closing a connection. good coding standards are to clean up resources when they are not being used. not providing a close method is bad practice.

@oncesk
Copy link
Owner

oncesk commented Apr 3, 2016

So, i am do not understand what are you want, you can not emit events from
php???
3 апр. 2016 г. 11:44 пользователь "jpodpro" [email protected]
написал:

Just now i added close method

this is not helpful


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#78 (comment)

@jpodpro
Copy link
Author

jpodpro commented Apr 3, 2016

i want to listen for server messages and then stop listening for server messages without reloading the page.

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