Explorar o código

Mark port started before StartAccept because StartAccept is a noop when the port is not started.

drieseng %!s(int64=9) %!d(string=hai) anos
pai
achega
32becde5ad
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Renci.SshNet/ForwardedPortDynamic.NET.cs

+ 2 - 2
src/Renci.SshNet/ForwardedPortDynamic.NET.cs

@@ -34,10 +34,10 @@ namespace Renci.SshNet
             Session.ErrorOccured += Session_ErrorOccured;
             Session.Disconnected += Session_Disconnected;
 
-            StartAccept(null);
-
             // consider port started when we're listening for inbound connections
             _status = ForwardedPortStatus.Started;
+
+            StartAccept(null);
         }
 
         private void StartAccept(SocketAsyncEventArgs e)