[Pkg-javascript-commits] [sockjs-client] 313/434: Make it possible to override rtt.
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository sockjs-client.
commit 55756153353a82baf2c86dc3d1705a2aa6edb5a3
Author: Marek Majkowski <majek04 at gmail.com>
Date: Mon Jan 16 12:30:09 2012 +0000
Make it possible to override rtt.
---
lib/sockjs.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/sockjs.js b/lib/sockjs.js
index 057e870..3d7b2f2 100644
--- a/lib/sockjs.js
+++ b/lib/sockjs.js
@@ -1,15 +1,16 @@
var SockJS = function(url, protocols_whitelist, options) {
var that = this;
- that._options = {devel: false, debug: false, info: undefined};
+ that._options = {devel: false, debug: false, info: undefined, rtt: undefined};
if (options) {
utils.objectExtend(that._options, options);
}
that._base_url = utils.amendUrl(url);
that._server = that._options.server || utils.random_number_string(1000);
- if (typeof protocols_whitelist === 'string') {
+ if (typeof protocols_whitelist === 'string' &&
+ protocols_whitelist.length > 0) {
protocols_whitelist = [protocols_whitelist];
} else if (!utils.isArray(protocols_whitelist)) {
- protocols_whitelist = [];
+ protocols_whitelist = null;
}
that._protocols = [];
that.protocol = null;
@@ -21,6 +22,9 @@ var SockJS = function(url, protocols_whitelist, options) {
// Override if user supplies the option
info = that._options.info;
}
+ if (that._options.rtt) {
+ rtt = that._options.rtt;
+ }
that._applyInfo(info, rtt, protocols_whitelist);
that._didClose();
} else {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list