{"action":"opened","issue":{"url":"https://api.github.com/repos/citolen/goproh4/issues/17","repository_url":"https://api.github.com/repos/citolen/goproh4","labels_url":"https://api.github.com/repos/citolen/goproh4/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/citolen/goproh4/issues/17/comments","events_url":"https://api.github.com/repos/citolen/goproh4/issues/17/events","html_url":"https://github.com/citolen/goproh4/issues/17","id":154477449,"number":17,"title":"EMFILE error when live streamimg","user":{"login":"ludwis","id":1543862,"avatar_url":"https://avatars.githubusercontent.com/u/1543862?v=3","gravatar_id":"","url":"https://api.github.com/users/ludwis","html_url":"https://github.com/ludwis","followers_url":"https://api.github.com/users/ludwis/followers","following_url":"https://api.github.com/users/ludwis/following{/other_user}","gists_url":"https://api.github.com/users/ludwis/gists{/gist_id}","starred_url":"https://api.github.com/users/ludwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludwis/subscriptions","organizations_url":"https://api.github.com/users/ludwis/orgs","repos_url":"https://api.github.com/users/ludwis/repos","events_url":"https://api.github.com/users/ludwis/events{/privacy}","received_events_url":"https://api.github.com/users/ludwis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-12T13:05:32Z","updated_at":"2016-05-12T13:05:32Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all thanks for great library!\r\n\r\nI was creating an app heavily working with live stream. At some point I've noticed the app is crashing after few hours with EMFILE bind thrown. After digging I've noticed that my app is constantly opening new UDP connections and that led me to your _keepAliveStart function. You are using UDP socket to send 'keep alive' message to the camera but the socket is never closed. After adding simple callback function (line 168 in index.js) to the send and closing socket problem disappeared.\r\n\r\n`client.send(GoPro.keepAliveMessage, 0, GoPro.keepAliveMessage.length, GoPro.keepAlivePort, self._ip, **function(err){ client.close(); }**);`"}}