diff --git a/src/host.js b/src/host.js index 1714a1c..3211ba7 100644 --- a/src/host.js +++ b/src/host.js @@ -56,6 +56,10 @@ Host.prototype.connect = function connect() { var me = this; return new Promise(function(resolve/*, reject*/) { me.onEvent('ready', function() { + if (me._isConnected) { + return; + } + resolve(Port.prototype.connect.call(me)); }); me.open();