Fix ApplicationWebSocket behaviour on IOException
This commit is contained in:
parent
99cb425199
commit
eeed531377
|
@ -7,6 +7,7 @@ using ln.json;
|
|||
using ln.logging;
|
||||
using ln.types.rpc;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
namespace ln.application
|
||||
{
|
||||
public class ApplicationWebSocket : WebsocketResource
|
||||
|
@ -48,6 +49,7 @@ namespace ln.application
|
|||
currentWebSockets.Add(webSocket);
|
||||
break;
|
||||
case WSREvent.CLOSE:
|
||||
case WSREvent.ERROR:
|
||||
currentWebSockets.Remove(webSocket);
|
||||
break;
|
||||
}
|
||||
|
@ -63,7 +65,12 @@ namespace ln.application
|
|||
{
|
||||
foreach (WebSocket webSocket in CurrentWebSockets)
|
||||
{
|
||||
try
|
||||
{
|
||||
webSocket.Send(text);
|
||||
}
|
||||
catch (IOException)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue