Skip to content

Commit 299b045

Browse files
author
Eric Maupin
committed
Fix NetworkConnectionProvider.LocalTargets
The contract specifies its supposed to be the targets it's actually listening to at the time which means it should be empty when not started and contain the actual point used when using random.
1 parent 74f195c commit 299b045

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Desktop/Tempest/Providers/Network/NetworkConnectionProvider.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ public NetworkConnectionProvider (IEnumerable<Protocol> protocols, Target target
149149

150150
public IEnumerable<Target> LocalTargets
151151
{
152-
get { return new[] { Target }; }
152+
get
153+
{
154+
if (this.reliableSocket != null && this.reliableSocket.IsBound)
155+
yield return this.reliableSocket.LocalEndPoint.ToTarget ();
156+
}
153157
}
154158

155159
/// <summary>

0 commit comments

Comments
 (0)