fix ws issue
This commit is contained in:
@@ -17,9 +17,7 @@ public class ChatModule : WebSocketModule
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var buffer = JsonSerializer.SerializeToUtf8Bytes(response, Statics.SerializerOptions);
|
var buffer = JsonSerializer.SerializeToUtf8Bytes(response, Statics.SerializerOptions);
|
||||||
await Task.WhenAll(ActiveContexts
|
await BroadcastAsync(buffer);
|
||||||
.Where(b => b.WebSocket.State is WebSocketState.Open)
|
|
||||||
.Select(context => context.WebSocket.SendAsync(buffer, true)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnMessageReceivedAsync(IWebSocketContext context, byte[] buffer, IWebSocketReceiveResult result)
|
protected override async Task OnMessageReceivedAsync(IWebSocketContext context, byte[] buffer, IWebSocketReceiveResult result)
|
||||||
|
@@ -29,9 +29,7 @@ public class LogsModule : WebSocketModule
|
|||||||
var response = new LogLineResponse(time, (LogLineLevel)level.Ordinal, logger, message);
|
var response = new LogLineResponse(time, (LogLineLevel)level.Ordinal, logger, message);
|
||||||
var buffer = JsonSerializer.SerializeToUtf8Bytes(response, Statics.SerializerOptions);
|
var buffer = JsonSerializer.SerializeToUtf8Bytes(response, Statics.SerializerOptions);
|
||||||
|
|
||||||
await Task.WhenAll(ActiveContexts
|
await BroadcastAsync(buffer);
|
||||||
.Where(b => b.WebSocket.State is WebSocketState.Open)
|
|
||||||
.Select(context => context.WebSocket.SendAsync(buffer, true)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ConfigureLogging()
|
private void ConfigureLogging()
|
||||||
|
@@ -2,5 +2,5 @@
|
|||||||
<PluginManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<PluginManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<Name>Torch Remote</Name>
|
<Name>Torch Remote</Name>
|
||||||
<Guid>284017F3-9682-4841-A544-EB04DB8CB9BA</Guid>
|
<Guid>284017F3-9682-4841-A544-EB04DB8CB9BA</Guid>
|
||||||
<Version>v1.0.8</Version>
|
<Version>v1.0.9</Version>
|
||||||
</PluginManifest>
|
</PluginManifest>
|
Reference in New Issue
Block a user