{"action":"created","issue":{"url":"https://api.github.com/repos/pBlueG/Socket/issues/2","labels_url":"https://api.github.com/repos/pBlueG/Socket/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/pBlueG/Socket/issues/2/comments","events_url":"https://api.github.com/repos/pBlueG/Socket/issues/2/events","html_url":"https://github.com/pBlueG/Socket/issues/2","id":39581291,"number":2,"title":"'onSocketRemoteDisconnect' callback is never called","user":{"login":"pedropapa","id":2160382,"avatar_url":"https://avatars.githubusercontent.com/u/2160382?v=3","gravatar_id":"","url":"https://api.github.com/users/pedropapa","html_url":"https://github.com/pedropapa","followers_url":"https://api.github.com/users/pedropapa/followers","following_url":"https://api.github.com/users/pedropapa/following{/other_user}","gists_url":"https://api.github.com/users/pedropapa/gists{/gist_id}","starred_url":"https://api.github.com/users/pedropapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedropapa/subscriptions","organizations_url":"https://api.github.com/users/pedropapa/orgs","repos_url":"https://api.github.com/users/pedropapa/repos","events_url":"https://api.github.com/users/pedropapa/events{/privacy}","received_events_url":"https://api.github.com/users/pedropapa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-08-06T01:13:50Z","updated_at":"2015-04-21T20:52:18Z","closed_at":null,"body":"My code:\r\n```pawn\r\n#include <a_samp>\r\n#include <a_http>\r\n#include <strlib>\r\n#include <sockets>\r\n#include <DiniToMysql>\r\n\r\nnew\r\n\tport,\r\n\tSocket:sock,\r\n\tSocket:nodejsSock,\r\n\tnodejsId,\r\n\tipLocal[64],\r\n\ttInds[20][128],\r\n\ttVals[20][128]\r\n;\r\n\r\npublic OnFilterScriptInit()\r\n{\r\n\r\n\tformat(ipLocal, sizeof(ipLocal), \"198.211.116.169\");\r\n\t//port = GetServerVarAsInt(\"port\");\r\n\r\n\tsock = socket_create(TCP);\r\n\t\r\n\tsocket_set_max_connections(sock, 100);\r\n\r\n\tsocket_bind(sock, ipLocal);\r\n\tsocket_listen(sock, 7778);\r\n\r\n\tprintf(\"Servidor TCP lendo no ip %s porta 7778\", ipLocal);\r\n\r\n\treturn 1;\r\n}\r\n\r\npublic onSocketRemoteConnect(Socket:id, remote_client[], remote_clientid) {\r\n\tprintf(\"Nova conexão estabelecida através do IP %s\", remote_client);\r\n\t\r\n\tnodejsSock = id;\r\n\tnodejsId = remote_clientid;\r\n\t\r\n\t//SetTimer(\"teste\", 10000, true);\r\n\r\n\treturn 1;\r\n}\r\n\r\npublic onSocketRemoteDisconnect(Socket:id, remote_clientid)\r\n{\r\n\tprintf(\"Client %d has left the room.\", remote_clientid);\r\n\t\r\n\treturn true;\r\n}\r\n```\r\n\r\nThe script works fine, I get 'Connect' messages and 'onSocketReceiveData' commands normally, but when I close the socket from client (A nodejs application), the 'onSocketRemoteDisconnect' callback is not called. "},"comment":{"url":"https://api.github.com/repos/pBlueG/Socket/issues/comments/94938438","html_url":"https://github.com/pBlueG/Socket/issues/2#issuecomment-94938438","issue_url":"https://api.github.com/repos/pBlueG/Socket/issues/2","id":94938438,"user":{"login":"Kar2k","id":4283893,"avatar_url":"https://avatars.githubusercontent.com/u/4283893?v=3","gravatar_id":"","url":"https://api.github.com/users/Kar2k","html_url":"https://github.com/Kar2k","followers_url":"https://api.github.com/users/Kar2k/followers","following_url":"https://api.github.com/users/Kar2k/following{/other_user}","gists_url":"https://api.github.com/users/Kar2k/gists{/gist_id}","starred_url":"https://api.github.com/users/Kar2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kar2k/subscriptions","organizations_url":"https://api.github.com/users/Kar2k/orgs","repos_url":"https://api.github.com/users/Kar2k/repos","events_url":"https://api.github.com/users/Kar2k/events{/privacy}","received_events_url":"https://api.github.com/users/Kar2k/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T20:52:18Z","updated_at":"2015-04-21T20:52:18Z","body":"onSocketRemoteDisconnect works fine for me."}}