From 2a42ff6e084c92b5f20b1ee120366023c1a41760 Mon Sep 17 00:00:00 2001 From: OttoMao Date: Mon, 2 Mar 2015 10:40:52 +0800 Subject: [PATCH] bugfix for websocket, update logo --- README.md | 2 +- webServer.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c88037..bb949a6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly. [中文wiki - 代理服务器的新轮子](https://github.com/alibaba/anyproxy/wiki/%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E6%96%B0%E8%BD%AE%E5%AD%90%EF%BC%9Aanyproxy) ,介绍我们为什么要再造一个代理服务器,anyproxy开放式的设计可以解决什么样的问题。 -![](http://gtms02.alicdn.com/tps/i2/TB1dMz.GVXXXXXxXVXXwCydIXXX-250-250.png) +anyproxy logo 特性 ------------ diff --git a/webServer.js b/webServer.js index a348d8b..b39705e 100644 --- a/webServer.js +++ b/webServer.js @@ -115,7 +115,11 @@ function proxyWebServer(port,webSocketPort,proxyConfigPort,ruleSummary,ipAddress wss.on("connection",function(ws){}); wss.broadcast = function(data) { for(var i in this.clients){ - this.clients[i].send(data); + try{ + this.clients[i].send(data); + }catch(e){ + console.log("websocket failed to send data, " + e); + } } };