mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
Refactor logging. Remove TCP adapter from HTTP host if disabled.
This commit is contained in:
@@ -25,6 +25,11 @@ namespace MQTTnet.AspNetCore
|
||||
.FirstOrDefault(p => p.ToLower().StartsWith("mqtt"));
|
||||
}
|
||||
|
||||
if (subprotocol == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var adapter = app.ApplicationServices.GetRequiredService<MqttWebSocketServerAdapter>();
|
||||
using (var webSocket = await context.WebSockets.AcceptWebSocketAsync(subprotocol))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user