]> git.wh0rd.org - chrome-ext/music-player-client.git/blobdiff - main.js
auto-reconnect when we get an error
[chrome-ext/music-player-client.git] / main.js
diff --git a/main.js b/main.js
index 26d0bc7ae4bd7eb1ceb5ff5375500b3e4a051a18..5b05cee5e2c101192829762c3b542f40b49f9d86 100644 (file)
--- a/main.js
+++ b/main.js
@@ -14,6 +14,10 @@ TcpClientSender.prototype.send = function(data, cb) {
 TcpClientSender.prototype.poll = function() {
        this.tcpclient.poll();
 }
+TcpClientSender.prototype.reconnect = function() {
+       this.tcpclient.disconnect();
+       this.tcpclient.connect();
+}
 
 function tramp_mpc_recv(data) {
        mpc.recv(data);