change: discard decrpecated GLOBAL

This commit is contained in:
Ya Zhuang
2016-05-31 14:13:24 +08:00
parent 207a20adf2
commit 4144beecc1
5 changed files with 32 additions and 22 deletions

View File

@@ -24,7 +24,7 @@ function resToMsg(msg,cb){
if(jsonData.type == "reqBody" && jsonData.id){
result.type = "body";
GLOBAL.recorder.getBody(jsonData.id, function(err, data){
global.recorder.getBody(jsonData.id, function(err, data){
if(err){
result.content = {
id : null,
@@ -74,7 +74,7 @@ function wsServer(config){
wss.on("close",function(){});
GLOBAL.recorder.on("update",function(data){
global.recorder.on("update",function(data){
try{
wss && wss.broadcast({
type : "update",
@@ -95,4 +95,4 @@ wsServer.prototype.closeAll = function(){
self.wss.close();
}
module.exports = wsServer;
module.exports = wsServer;