{"action":"created","issue":{"url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/102","repository_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework","labels_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/102/comments","events_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/102/events","html_url":"https://github.com/planetteamspeak/ts3phpframework/issues/102","id":356200804,"node_id":"MDU6SXNzdWUzNTYyMDA4MDQ=","number":102,"title":"Teamspeak API lost connection","user":{"login":"Mickroz","id":994362,"node_id":"MDQ6VXNlcjk5NDM2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/994362?v=4","gravatar_id":"","url":"https://api.github.com/users/Mickroz","html_url":"https://github.com/Mickroz","followers_url":"https://api.github.com/users/Mickroz/followers","following_url":"https://api.github.com/users/Mickroz/following{/other_user}","gists_url":"https://api.github.com/users/Mickroz/gists{/gist_id}","starred_url":"https://api.github.com/users/Mickroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mickroz/subscriptions","organizations_url":"https://api.github.com/users/Mickroz/orgs","repos_url":"https://api.github.com/users/Mickroz/repos","events_url":"https://api.github.com/users/Mickroz/events{/privacy}","received_events_url":"https://api.github.com/users/Mickroz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-01T13:01:50Z","updated_at":"2018-09-02T16:47:10Z","closed_at":null,"author_association":"NONE","body":"i updated my server today to 3.3.1 on linux and got every 6 minutes an error in my log saying:\r\n```\r\nconnection to server 'localhost:10011' lost on line 128 in /libraries/TeamSpeak3/Transport/TCP.php\r\n```\r\nthen i found out there was a new version out, so i updated the library to version 1.1.32\r\ngot the same error on a diff line:\r\n```\r\nconnection to server 'localhost:10011' lost on line 131 in /libraries/TeamSpeak3/Transport/TCP.php\r\n```\r\nso i updated to latest and got the same error back:\r\n```\r\nconnection to server 'localhost:10011' lost on line 161 in /libraries/TeamSpeak3/Transport/TCP.php\r\n```\r\n\r\nthis is the part of the bot:\r\n```php\r\nTeamSpeak3::init();\r\n\r\ntry\r\n{\r\n  /* subscribe to various events */\r\n  TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"serverqueryConnected\", \"onConnect\");\r\n  TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"serverqueryWaitTimeout\", \"onTimeout\");\r\n  TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"notifyLogin\", \"onLogin\");\r\n  TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"notifyEvent\", \"onEvent\");\r\n  TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"notifyServerselected\", \"onSelect\");\r\n\r\n  /* connect to server, login and get TeamSpeak3_Node_Host object by URI */\r\n  $ts3 = TeamSpeak3::factory(\"serverquery://\". $config['teamspeak']['loginname'] .\":\". $config['teamspeak']['loginpass'] .\"@\". $config['teamspeak']['ip'] .\":\". $config['teamspeak']['queryport'] .\"/?server_port=\". $config['teamspeak']['serverport'] .\"&nickname=\". $config['teamspeak']['console_displayname'] .\"&blocking=0\");\r\n\r\n  /* wait for events */\r\n  while(1) $ts3->getAdapter()->wait();\r\n}\r\ncatch(Exception $e)\r\n{\r\n\t$log->error('console', $e->getCode() . \": \" . $e->getMessage() . \" on line \" . $e->getLine() . \" in \" . $e->getFile());\r\n\tdie(udate('Y-m-d H:i:s:u') . \"\\t[ERROR]\\t\"  . $e->getCode() . \": \" . $e->getMessage() . \" on line \" . $e->getLine() . \" in \" . $e->getFile() . \"\\n\");\r\n}\r\n```\r\nrunning on PHP Version 7.2.5, any ideas?"},"comment":{"url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/comments/417943640","html_url":"https://github.com/planetteamspeak/ts3phpframework/issues/102#issuecomment-417943640","issue_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/102","id":417943640,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzk0MzY0MA==","user":{"login":"ronindesign","id":1414401,"node_id":"MDQ6VXNlcjE0MTQ0MDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1414401?v=4","gravatar_id":"","url":"https://api.github.com/users/ronindesign","html_url":"https://github.com/ronindesign","followers_url":"https://api.github.com/users/ronindesign/followers","following_url":"https://api.github.com/users/ronindesign/following{/other_user}","gists_url":"https://api.github.com/users/ronindesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ronindesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronindesign/subscriptions","organizations_url":"https://api.github.com/users/ronindesign/orgs","repos_url":"https://api.github.com/users/ronindesign/repos","events_url":"https://api.github.com/users/ronindesign/events{/privacy}","received_events_url":"https://api.github.com/users/ronindesign/received_events","type":"User","site_admin":false},"created_at":"2018-09-02T16:47:10Z","updated_at":"2018-09-02T16:47:10Z","author_association":"COLLABORATOR","body":"Here's what I've used for keepalive in the past, maybe you can implement something similar:\r\n\r\n```php\r\n/**\r\n * Callback method for 'serverqueryWaitTimeout' signals.\r\n *\r\n * @param  integer $seconds\r\n * @return void\r\n */\r\nfunction onTimeout($seconds, TeamSpeak3_Adapter_ServerQuery $adapter)\r\n{ \r\n  if ($seconds % 20 == 0)\r\n    echo \"[SIGNAL] no reply from the server for \" . $seconds . \" seconds\\n\";\r\n  \r\n  if($adapter->getQueryLastTimestamp() < time()-300)\r\n  { \r\n    echo \"[INFO]   sending keep-alive command\\n\";\r\n    \r\n    $adapter->request(\"clientupdate\");\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"ronindesign"}}