mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-06-03 16:56:41 +00:00
Move require('ws') back to where it was.
Add comment explaining why it's there.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var util = require('util');
|
||||
var WebSocket = require('ws');
|
||||
var utils = require('./utils');
|
||||
|
||||
/**
|
||||
@@ -97,6 +96,9 @@ Server.prototype.connect = function() {
|
||||
this._ws.close();
|
||||
}
|
||||
|
||||
// We require this late, because websocket shims may be loaded after
|
||||
// ripple-lib.
|
||||
var WebSocket = require('ws');
|
||||
var ws = this._ws = new WebSocket(this._opts.url);
|
||||
|
||||
this._should_connect = true;
|
||||
|
||||
Reference in New Issue
Block a user