From 40d9370bb6f53e3dd0f48ecbb4ffa1de6e23a933 Mon Sep 17 00:00:00 2001 From: Michael Borkenstein Date: Wed, 11 Sep 2019 13:46:23 -0500 Subject: [PATCH] AUTH-2050: Adds time.sleep to temporarily avoid hitting tunnel muxer dealock issue --- sshserver/sshserver_unix.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sshserver/sshserver_unix.go b/sshserver/sshserver_unix.go index 5e968664..e8be77ea 100644 --- a/sshserver/sshserver_unix.go +++ b/sshserver/sshserver_unix.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "net" "os" "os/exec" "os/user" @@ -87,6 +88,13 @@ func New(logManager sshlog.Manager, logger *logrus.Logger, version, address stri logManager: logManager, } + // AUTH-2050: This is a temporary workaround of a timing issue in the tunnel muxer to allow further testing. + // TODO: Remove this + sshServer.ConnCallback = func(conn net.Conn) net.Conn { + time.Sleep(10 * time.Millisecond) + return conn + } + if enablePortForwarding { sshServer.LocalPortForwardingCallback = allowForward sshServer.ReversePortForwardingCallback = allowForward