diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 1358df915..7ea1ce6df 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -31,7 +31,7 @@ L.Socket = L.Class.extend({ sendMessage: function (msg, coords) { var socketState = this.socket.readyState; if (socketState === 2 || socketState === 3) { - this.connect(this._map); + this.initialize(this._map); this._msgQueue.push({msg: msg, coords: coords}); }