diff --git a/lib/main.js b/lib/main.js index c92c57f0..b25936ca 100644 --- a/lib/main.js +++ b/lib/main.js @@ -309,7 +309,7 @@ SockJS.prototype._transportClose = function(code, reason) { }; SockJS.prototype._open = function() { - debug('_open', this._transport.transportName, this.readyState); + debug('_open', this._transport && this._transport.transportName, this.readyState); if (this.readyState === SockJS.CONNECTING) { if (this._transportTimeoutId) { clearTimeout(this._transportTimeoutId);