diff --git a/src/rpc/rpc_ws.js b/src/rpc/rpc_ws.js index bae24bf9d6..548a03323f 100644 --- a/src/rpc/rpc_ws.js +++ b/src/rpc/rpc_ws.js @@ -1,7 +1,7 @@ /* Copyright (C) 2016 NooBaa */ 'use strict'; -const WS = global.WebSocket || require('ws'); +const WS = require('ws'); const dbg = require('../util/debug_module')(__filename); const http_utils = require('../util/http_utils'); diff --git a/src/rpc/rpc_ws_server.js b/src/rpc/rpc_ws_server.js index 89baacb37a..5cd3be8c79 100644 --- a/src/rpc/rpc_ws_server.js +++ b/src/rpc/rpc_ws_server.js @@ -5,7 +5,7 @@ const url = require('url'); const EventEmitter = require('events').EventEmitter; const RpcWsConnection = require('./rpc_ws'); const dbg = require('../util/debug_module')(__filename); -const WS = global.WebSocket || require('ws'); +const WS = require('ws'); /**