Skip to content

Commit 8c2ad76

Browse files
committed
Merge pull request #445 from ajaxorg/master
Fix for calling open as a function while its a boolean
2 parents b6aa5c0 + 9d0c063 commit 8c2ad76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/socket.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@
221221

222222
// once the transport is ready
223223
self.transport.ready(self, function () {
224+
if (typeof self.transport.open != "function")
225+
return self.publish('connect_failed');
226+
224227
self.connecting = true;
225228
self.publish('connecting', self.transport.name);
226229
self.transport.open();

0 commit comments

Comments
 (0)