Skip to content

Commit 32becde

Browse files
committed
Mark port started before StartAccept because StartAccept is a noop when the port is not started.
1 parent f88509e commit 32becde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Renci.SshNet/ForwardedPortDynamic.NET.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ partial void InternalStart()
3434
Session.ErrorOccured += Session_ErrorOccured;
3535
Session.Disconnected += Session_Disconnected;
3636

37-
StartAccept(null);
38-
3937
// consider port started when we're listening for inbound connections
4038
_status = ForwardedPortStatus.Started;
39+
40+
StartAccept(null);
4141
}
4242

4343
private void StartAccept(SocketAsyncEventArgs e)

0 commit comments

Comments
 (0)