From 38c0d328be429fb8eda3ab428478b78d3ecef002 Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Thu, 6 Aug 2015 11:13:25 -0400 Subject: [PATCH] Bump js build and changelog --- CHANGELOG.md | 5 +++++ priv/static/phoenix.js | 6 +++--- web/static/js/phoenix.js | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1cd118272..644037ab9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v0.16.1 (2015-8-6) + +* JavaScript client bug fixes + * Pass socket params on reconnect + ## v0.16.0 (2015-8-5) See these [`0.15.x` to `0.16.0` upgrade instructions](https://gist.github.com/chrismccord/969d75d1562979a3ae37) to bring your existing apps up to speed. diff --git a/priv/static/phoenix.js b/priv/static/phoenix.js index 7c020cec52..4cd8a1e792 100644 --- a/priv/static/phoenix.js +++ b/priv/static/phoenix.js @@ -583,12 +583,12 @@ var Socket = exports.Socket = (function () { this.reconnectAfterMs = opts.reconnectAfterMs || function (tries) { return [1000, 5000, 10000][tries - 1] || 10000; }; - this.reconnectTimer = new Timer(function () { - return _this.connect(); - }, this.reconnectAfterMs); this.logger = opts.logger || function () {}; // noop this.longpollerTimeout = opts.longpollerTimeout || 20000; this.params = {}; + this.reconnectTimer = new Timer(function () { + return _this.connect(_this.params); + }, this.reconnectAfterMs); this.endPoint = "" + endPoint + "/" + TRANSPORTS.websocket; } diff --git a/web/static/js/phoenix.js b/web/static/js/phoenix.js index d22424ea84..99f218799d 100644 --- a/web/static/js/phoenix.js +++ b/web/static/js/phoenix.js @@ -346,10 +346,10 @@ export class Socket { this.reconnectAfterMs = opts.reconnectAfterMs || function(tries){ return [1000, 5000, 10000][tries - 1] || 10000 } - this.reconnectTimer = new Timer(() => this.connect(this.params), this.reconnectAfterMs) this.logger = opts.logger || function(){} // noop this.longpollerTimeout = opts.longpollerTimeout || 20000 this.params = {} + this.reconnectTimer = new Timer(() => this.connect(this.params), this.reconnectAfterMs) this.endPoint = `${endPoint}/${TRANSPORTS.websocket}` }