{"action":"created","issue":{"url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/14","repository_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework","labels_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/14/comments","events_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/14/events","html_url":"https://github.com/planetteamspeak/ts3phpframework/issues/14","id":174914879,"number":14,"title":"avatarDownload() - TCP Connection not closed","user":{"login":"Newcomer1989","id":11364569,"avatar_url":"https://avatars.githubusercontent.com/u/11364569?v=3","gravatar_id":"","url":"https://api.github.com/users/Newcomer1989","html_url":"https://github.com/Newcomer1989","followers_url":"https://api.github.com/users/Newcomer1989/followers","following_url":"https://api.github.com/users/Newcomer1989/following{/other_user}","gists_url":"https://api.github.com/users/Newcomer1989/gists{/gist_id}","starred_url":"https://api.github.com/users/Newcomer1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Newcomer1989/subscriptions","organizations_url":"https://api.github.com/users/Newcomer1989/orgs","repos_url":"https://api.github.com/users/Newcomer1989/repos","events_url":"https://api.github.com/users/Newcomer1989/events{/privacy}","received_events_url":"https://api.github.com/users/Newcomer1989/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-03T20:07:03Z","updated_at":"2016-09-14T19:24:39Z","closed_at":"2016-09-14T19:24:39Z","body":"I wrote a bot, which downloads the avatars by getting this from the filelist (cid=0).\r\n`$ts3->channelFileList($cid=\"0\", $cpw=\"\", $path=\"/\");`\r\n\r\nI took the passage from the avatarDownload() function and only modified it a bit, because the filelist give me already the file name that is needed for the download.\r\n\r\n```\r\n$avatar = $ts3->transferInitDownload($clientftfid=\"5\",$cid=\"0\",$name=$fullfilename,$cpw=\"\", seekpos=0);\r\n$transfer = TeamSpeak3::factory(\"filetransfer://\" . $avatar[\"host\"] . \":\" . $avatar[\"port\"]);\r\n$tsfile = $transfer->download($avatar[\"ftkey\"], $avatar[\"size\"]);\r\n$avatarfilepath\t= substr(__DIR__,0,-4).'avatars/'.$uuidasbase16.'.png';\r\n```\r\n\r\nThis works great. The avatar gets downloaded like wished.\r\n\r\nFor each download of an avatar there will be opened a TCP connection to the ts3 server. That's ok and correct. However I think this connection will not be closed by the framework.\r\nI see there stands for each downloaded avatar a connection on status \"CLOSE_WAIT\".\r\nThe problem is that my script runs as bot, so the connection will not be closed until the bot runs.\r\n\r\n> \r\ntcp        0      0 xxx.xxx.xxx.xxx:38539    xxx.xxx.xxx.xxx:30033   CLOSE_WAIT  19931/php\r\n\r\nDid I something wrong in my code or the handling of the TCP connections inside the framework are the problem?"},"comment":{"url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/comments/247125766","html_url":"https://github.com/planetteamspeak/ts3phpframework/issues/14#issuecomment-247125766","issue_url":"https://api.github.com/repos/planetteamspeak/ts3phpframework/issues/14","id":247125766,"user":{"login":"svenpaulsen","id":7894194,"avatar_url":"https://avatars.githubusercontent.com/u/7894194?v=3","gravatar_id":"","url":"https://api.github.com/users/svenpaulsen","html_url":"https://github.com/svenpaulsen","followers_url":"https://api.github.com/users/svenpaulsen/followers","following_url":"https://api.github.com/users/svenpaulsen/following{/other_user}","gists_url":"https://api.github.com/users/svenpaulsen/gists{/gist_id}","starred_url":"https://api.github.com/users/svenpaulsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svenpaulsen/subscriptions","organizations_url":"https://api.github.com/users/svenpaulsen/orgs","repos_url":"https://api.github.com/users/svenpaulsen/repos","events_url":"https://api.github.com/users/svenpaulsen/events{/privacy}","received_events_url":"https://api.github.com/users/svenpaulsen/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T19:24:39Z","updated_at":"2016-09-14T19:24:39Z","body":"Fixed with pull request #16."}}
{"actor":{"display_login":"svenpaulsen"}}