From 8f0da727ac247d6528cf554963a358356a7b2805 Mon Sep 17 00:00:00 2001 From: Jonathan Gros-Dubois Date: Wed, 8 Mar 2017 19:31:12 +0000 Subject: [PATCH] Added connecting event --- bower.json | 2 +- index.js | 2 +- lib/scsocket.js | 2 ++ package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index d350caf..2f79e4e 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "socketcluster-client", "main": "socketcluster.js", - "version": "5.2.5", + "version": "5.3.0", "homepage": "https://github.com/SocketCluster/socketcluster-client", "description": "SocketCluster JavaScript client", "authors": [ diff --git a/index.js b/index.js index 70b258c..9e1b10a 100644 --- a/index.js +++ b/index.js @@ -16,4 +16,4 @@ module.exports.destroy = function (options) { module.exports.connections = SCSocketCreator.connections; -module.exports.version = '5.2.5'; +module.exports.version = '5.3.0'; diff --git a/lib/scsocket.js b/lib/scsocket.js index 3f37ec8..e543834 100644 --- a/lib/scsocket.js +++ b/lib/scsocket.js @@ -259,6 +259,8 @@ SCSocket.prototype.connect = SCSocket.prototype.open = function () { clearTimeout(this._reconnectTimeoutRef); this.state = this.CONNECTING; + SCEmitter.prototype.emit.call(this, 'connecting'); + this._changeToPendingAuthState(); if (this.transport) { diff --git a/package.json b/package.json index b184348..f0a0b65 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "socketcluster-client", "description": "SocketCluster JavaScript client", - "version": "5.2.5", + "version": "5.3.0", "homepage": "http://socketcluster.io", "contributors": [ {