Skip to content

Commit

Permalink
avoid ArgumentException in multi-thread scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
ssg committed Oct 19, 2024
1 parent e2df39e commit 6a03128
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FluentFTP/Streams/FtpSocketStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ private IPAddress[] GetCachedHostAddresses(string host) {
#else
ipads = Dns.GetHostAddresses(host);
#endif
Client.Status.CachedHostIpads.Add(host, ipads);
Client.Status.CachedHostIpads[host] = ipads;
}

return ipads;
Expand Down Expand Up @@ -1019,7 +1019,7 @@ private async Task<IPAddress[]> GetCachedHostAddressesAsync(string host, Cancell
#else
ipads = await Dns.GetHostAddressesAsync(host);
#endif
Client.Status.CachedHostIpads.Add(host, ipads);
Client.Status.CachedHostIpads[host] = ipads;
}

return ipads;
Expand Down

0 comments on commit 6a03128

Please sign in to comment.