-
Notifications
You must be signed in to change notification settings - Fork 35
[solved] Socket closed #3
Comments
Hey PunKeel, thanks for your message. I'll take a look at this the next days :) code suggestions welcome Best regards |
I'm still trying to find a solution for detecting death connections. Mabye @Viper61 could help? 😆 |
Currently I have no idea how to solve this :-( |
I found this function here, i dont know if it can help you @par0noid |
@par0noid Just try to send a packet to check if socket is alive 👍 |
I think @toxiicdev s idea is a good way. Or you can do a socket_get_status() and check if the socket is open/connected. |
@TheVaan Yea I think that socket_get_status() would be a better solution, but we should be sure that it works properly. |
Thank you guys, especially @toxiicdev for your help! Version 1.0.1.3 is out now with your bugfix. Together we can achieve anything! ♥ |
hi there, i made a imho ugly workaround, have 2 different ways for it:
both do the same, they give me the chance to access the runtime property to reach the socket.
this operation is necessary cuz the socket session will be invalid if the server comes up again. imho, the class could have a property/var which switches when the socket state changes from online to offline without having to build workarounds like the 2 i wrote before. a deamon could just access this property to know if its allowed to run commands or do other operations (for example try to reconnect, sent to a website/db a info that the server went offline). perhaps some of you have a better way to get it done without manipulating the main class. let me know what you think about. |
Hello,
There is no support if the socket is closed: the while loops becomes an infinite loop here: https://github.com/par0noid/ts3admin.class/blob/master/lib/ts3admin.class.php#L4211
What about adding basic support for detecting dead sockets?
Thx! :)
The text was updated successfully, but these errors were encountered: