Load WebSocket module later.

This one change allows us to load the IE polyfills after the Ripple library.
Otherwise we would have to split up our dependencies into two groups, which
would add a bunch of complexity to the build system that I'd rather avoid.
This commit is contained in:
Stefan Thomas
2013-01-22 20:12:57 +01:00
parent 88c2062c89
commit 88032c6717

View File

@@ -15,8 +15,6 @@
//
// npm
var WebSocket = require('ws');
var EventEmitter = require('events').EventEmitter;
var Amount = require('./amount.js').Amount;
var Currency = require('./amount.js').Currency;
@@ -427,6 +425,7 @@ Remote.prototype._connect_start = function () {
if (this.trace) console.log("remote: connect: %s", url);
var WebSocket = require('ws');
var ws = this.ws = new WebSocket(url);
ws.response = {};