respectTheCode / node-caspar-cg

CasparCG interface for node.js
MIT License
46 stars 28 forks source link

auto reconnect #7

Closed respectTheCode closed 11 years ago

respectTheCode commented 12 years ago

Auto reconnect should try to connect after a delay and continue to attempt until it is stopped by a reconnect limit.

hreinnbeck commented 11 years ago

Done. Added option.interval to set the interval for reconnects in seconds. Also added the event "reconnecting" and modified the net.on("error") to be "connectionError" so it won't collide with net's error.

Patch for connection.js: https://gist.github.com/hreinnbeck/3ef9445c62ee7d8ebaa2

respectTheCode commented 11 years ago

Awesome. Send a pull request and I'll take a look.