Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Src/Common/FieldWorks/FieldWorks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3484,8 +3484,12 @@ internal static bool RunOnRemoteClients(string requestType, Func<RemoteRequest,
/// ------------------------------------------------------------------------------------
private static RemoteRequest CreateRequestor(int port, string requestType)
{
// LT-22069: connect via the IPv4 loopback literal rather than "localhost". Resolving
// "localhost" can try IPv6 (::1) first and wait ~2s for it to fail before falling back
// to IPv4, and that cost is paid on every first-contact to another FieldWorks process's
// remoting port. Using 127.0.0.1 avoids the name-resolution/IPv6 stall.
RemoteRequest requestor = (RemoteRequest)Activator.GetObject(typeof(RemoteRequest),
"tcp://localhost:" + port + "/" + requestType);
"tcp://127.0.0.1:" + port + "/" + requestType);
Func<bool> invoker = requestor.IsAlive;
IAsyncResult ar = invoker.BeginInvoke(null, null);
if (!ar.AsyncWaitHandle.WaitOne(1000, false))
Expand Down
Loading