Skip to content

Commit

Permalink
SocketOptionName.ReuseAddress can only be used for listening Socket s…
Browse files Browse the repository at this point in the history
…ettings.
  • Loading branch information
xljiulang committed Dec 9, 2024
1 parent 51fb185 commit 79f4f68
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Source/MQTTnet.AspnetCore/KestrelServerOptionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ private static void AdaptTo(this MqttServerTcpEndpointBaseOptions endpoint, Sock
socket.LingerState = endpoint.LingerState;
}

if (endpoint.ReuseAddress)
{
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
}

if (endpoint.KeepAlive.HasValue)
{
var value = endpoint.KeepAlive.Value;
Expand Down

0 comments on commit 79f4f68

Please sign in to comment.