summaryrefslogtreecommitdiff
path: root/csharp
diff options
context:
space:
mode:
authorJose <pepone@users.noreply.github.com>2020-04-21 20:13:09 +0200
committerGitHub <noreply@github.com>2020-04-21 20:13:09 +0200
commit1112ec27dff04eb0bb62f139a0d01f2db014891b (patch)
tree20deabc1d35154f06fa6e18bc27c9c5fd4a45a23 /csharp
parentUse TryGetValue instead of operator [] - Close #666 (diff)
downloadice-1112ec27dff04eb0bb62f139a0d01f2db014891b.tar.bz2
ice-1112ec27dff04eb0bb62f139a0d01f2db014891b.tar.xz
ice-1112ec27dff04eb0bb62f139a0d01f2db014891b.zip
Fix C# TPC endpoint source address usage - Close #783 (#812)
Diffstat (limited to 'csharp')
-rw-r--r--csharp/src/Ice/StreamSocket.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/csharp/src/Ice/StreamSocket.cs b/csharp/src/Ice/StreamSocket.cs
index 9e3c3ca461f..c8c7d39c97b 100644
--- a/csharp/src/Ice/StreamSocket.cs
+++ b/csharp/src/Ice/StreamSocket.cs
@@ -240,6 +240,10 @@ namespace IceInternal
try
{
EndPoint addr = _proxy != null ? _proxy.getAddress() : _addr;
+ if (_sourceAddr != null)
+ {
+ Network.doBind(_fd, _sourceAddr);
+ }
_writeEventArgs.RemoteEndPoint = addr;
_writeEventArgs.UserToken = state;
return !_fd.ConnectAsync(_writeEventArgs);