I 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.
Thanks for finding this !
Do you want to make a pull request for it ?
I will publish a new version to npm fixing some other issue as well in the next couple of day hopefully.
Hi,
First of all thanks for great library!
I 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.
client.send(GoPro.keepAliveMessage, 0, GoPro.keepAliveMessage.length, GoPro.keepAlivePort, self._ip, **function(err){ client.close(); }**);