From 576f4ee85e058ad8470bb8323789c68af47c1b0b Mon Sep 17 00:00:00 2001 From: Fredrik Bonander Date: Thu, 7 Jan 2016 11:34:03 +0000 Subject: [PATCH] chore(release): v0.0.18 --- CHANGELOG.md | 11 +++++++++++ bower.json | 2 +- dist/ngAutobahn.js | 22 ++++++++++++++-------- dist/ngAutobahn.min.js | 6 +++--- package.json | 2 +- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d317b..3dd96a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ + +## [0.0.18](https://github.com/ef-ctx/ngAutobahn/compare/v0.0.17...v0.0.18) (2016-01-07) + + +### Bug Fixes + +* **CxSocketConnection:** notify about lost conenction on success ([9e4cb14](https://github.com/ef-ctx/ngAutobahn/commit/9e4cb14)) +* **NgAutobahnConnectionPing:** typo on isOpen ([cc70e62](https://github.com/ef-ctx/ngAutobahn/commit/cc70e62)) + + + ## [0.0.17](https://github.com/ef-ctx/ngAutobahn/compare/v0.0.16...v0.0.17) (2015-12-23) diff --git a/bower.json b/bower.json index 224cdb0..2a6bcf5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ngAutobahn", - "version": "0.0.17", + "version": "0.0.18", "description": "angular modules for autobahn real time services over WAMP web socket protocol ", "authors": [ "EF CTX (http://efclass.io)" diff --git a/dist/ngAutobahn.js b/dist/ngAutobahn.js index 0bdb79e..df03a2c 100644 --- a/dist/ngAutobahn.js +++ b/dist/ngAutobahn.js @@ -1,8 +1,8 @@ /********************************************************** * - * ngAutobahn - v0.0.17 + * ngAutobahn - v0.0.18 * - * Release date : 2015-12-23 : 18:39 + * Release date : 2016-01-07 : 11:34 * Author : Jaime Beneytez - EF CTX * License : MIT * @@ -177,16 +177,22 @@ return defer.promise; - function onOpen(session) { - _session = session; - defer.resolve(session); - _connectionOpenedHandler(); + function onCloseAndNotify() { + _connection.onclose = null; + _connectionLostHandler(); } function onErrorOpening() { _connection.onclose = null; defer.reject(); - _connectionLostHandler(); + } + + function onOpen(session) { + _session = session; + defer.resolve(session); + + _connectionOpenedHandler(); + _connection.onclose = onCloseAndNotify; } } @@ -747,7 +753,7 @@ $rootScope.$on(NG_AUTOBAHN_CONNECTION_EVENTS.LOST, _ping.stop); $rootScope.$on(NG_AUTOBAHN_CONNECTION_EVENTS.CLOSE, _ping.stop); - if (ngAutobahnConnection.isOpened) { + if (ngAutobahnConnection.isOpen) { _ping.start(); } }; diff --git a/dist/ngAutobahn.min.js b/dist/ngAutobahn.min.js index 107c349..53b9c65 100644 --- a/dist/ngAutobahn.min.js +++ b/dist/ngAutobahn.min.js @@ -1,8 +1,8 @@ /********************************************************** * - * ngAutobahn - v0.0.17 + * ngAutobahn - v0.0.18 * - * Release date : 2015-12-23 : 18:39 + * Release date : 2016-01-07 : 11:34 * Author : Jaime Beneytez - EF CTX * License : MIT * @@ -10,4 +10,4 @@ -!function(a){"use strict";a.module("ngAutobahn.connection",[]).constant("NG_AUTOBAHN_CONNECTION_STATUS",{OPENED:"ngAutobahn.connection.state.opened",CLOSED:"ngAutobahn.connection.state.closed",LOST:"ngAutobahn.connection.state.lost"}).constant("NG_AUTOBAHN_CONNECTION_EVENTS",{OPEN:"ngAutobahn.connection.open",CLOSE:"ngAutobahn.connection.close",LOST:"ngAutobahn.connection.lost"}).provider("ngAutobahnConnection",[function(){var b={},c={mockMode:!1,url:null,realm:null,retries:{max:100,initialDelay:3,delayGrowthFactor:1.5,maxDelay:300,delayJitter:.1}};this.configure=function(d){a.extend(c,d),b={url:c.url,realm:c.realm,max_retries:c.retries.max,initial_retry_delay:c.retries.initialDelay,retry_delay_growth:c.retries.delayGrowthFactor,max_retry_delay:c.retries.maxDelay,retry_delay_jitter:c.retries.delayJitter}},this.$get=["$q","$rootScope","NG_AUTOBAHN_CONNECTION_STATUS","NG_AUTOBAHN_CONNECTION_EVENTS",function(a,c,d,e){function f(){function f(){function c(a){p=a,e.resolve(a),l()}function d(){q.onclose=null,e.reject(),j()}var e=a.defer();return q?(e.resolve(p),l()):(q=new autobahn.Connection(b),q.onopen=c,q.onclose=d,q.open()),e.promise}function g(){return h().then(k)}function h(){function b(a){q.onclose=null,q=null,c.resolve()}var c=a.defer();return q?(q.onclose=b,q.close()):c.reject(),c.promise}function i(){j(),h().then(f)}function j(){s=d.LOST,o()}function k(){s=d.CLOSED,n()}function l(){s=d.OPENED,m()}function m(){c.$broadcast(e.OPEN,p)}function n(a){c.$broadcast(e.CLOSE,a)}function o(a){c.$broadcast(e.LOST,a)}var p,q,r=this,s=d.CLOSED;r.openConnection=f,r.closeConnection=g,r.resetConnection=i,Object.defineProperty(r,"status",{get:function(){return s}}),Object.defineProperty(r,"isOpen",{get:function(){return s===d.OPENED}}),Object.defineProperty(r,"isClosed",{get:function(){return s===d.CLOSED}}),Object.defineProperty(r,"isLost",{get:function(){return s===d.LOST}})}return new f}]}])}(angular),function(a){"use strict";a.module("ngAutobahn.messageBroker",[]).factory("NgAutobahnMessageBroker",["$rootScope",function(a){function b(b,c){function d(a,b){k[a]||(k[a]=[]),k[a].push(b)}function e(a,b){return c(j,a,b)}function f(){return j}function g(b,c){var d=c.channel,e=c.type,f=c.data;h(d,e)&&(i(e,f),a.$applyAsync())}function h(a,b){return j===a&&k[b]}function i(a,b){for(var c=k[a],d=0;d