Refactor logging. Remove TCP adapter from HTTP host if disabled.

This commit is contained in:
Christian
2018-05-13 20:18:08 +02:00
parent 8df8cb1eb6
commit dc7b9414d9
13 changed files with 41 additions and 38 deletions
@@ -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))
{