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
@@ -504,20 +504,16 @@ namespace MQTTnet.Client
private void StartReceivingPackets(CancellationToken cancellationToken)
{
_packetReceiverTask = Task.Factory.StartNew(
_packetReceiverTask = Task.Run(
() => ReceivePacketsAsync(cancellationToken),
cancellationToken,
TaskCreationOptions.LongRunning,
TaskScheduler.Current);
cancellationToken);
}
private void StartSendingKeepAliveMessages(CancellationToken cancellationToken)
{
_keepAliveMessageSenderTask = Task.Factory.StartNew(
_keepAliveMessageSenderTask = Task.Run(
() => SendKeepAliveMessagesAsync(cancellationToken),
cancellationToken,
TaskCreationOptions.LongRunning,
TaskScheduler.Current);
cancellationToken);
}
private void StartProcessReceivedPacketAsync(MqttBasePacket packet, CancellationToken cancellationToken)