Skip to content

Commit

Permalink
Add dualmode IPv4/IPv6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Difegue committed Jan 27, 2022
1 parent 28e5dbd commit 6bcc61b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/MpcNET/MpcConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ private async Task ReconnectAsync(bool isReconnect, CancellationToken token = de
.RetryAsync(isReconnect ? 0 : 3)
.ExecuteAndCaptureAsync(async (t) =>
{
var client = new TcpClient();
var client = new TcpClient(AddressFamily.InterNetworkV6);
client.Client.DualMode = true; // Enable both IPv4 and IPv6
using (t.Register(() => client.Close()))
{
try
Expand Down

0 comments on commit 6bcc61b

Please sign in to comment.