summaryrefslogtreecommitdiffstats
path: root/modules/ssh
diff options
context:
space:
mode:
authorJonRB <4564448+eeyrjmr@users.noreply.github.com>2022-08-20 22:09:41 +0100
committerGitHub <noreply@github.com>2022-08-20 22:09:41 +0100
commitcb37c6ba5cc3c8113a7252e16b386eb887346185 (patch)
tree600a3453f8bfc1282e46a7d04d478e9038d8f47e /modules/ssh
parent3d52edc7a43ca429b7921b96c3663c32179881ab (diff)
downloadgitea-cb37c6ba5cc3c8113a7252e16b386eb887346185.tar.gz
gitea-cb37c6ba5cc3c8113a7252e16b386eb887346185.zip
call builtinUnused() if internal SSH is disabled (#20877)
The graceful manager waits for 4 listeners to be created or to be told that they are not needed. If it is not told about them it will indefinitely and timeout. This leads to SVC hosts not being told of being in the readyState but on Unix would lead to the termination of the process. There was an unfortunate regression in #20299 which missed this subtly and in the case whereby SSH is disabled the `builtinUnused()` is not called. This PR adds a call to `builtinUnused()` when not using the builtin ssh to allow `createServerWaitGroup.Done()` to be called. In addition it was noted that the if/else clauses for timeout informing of the SVC host were in the wrong order. These have been swapped. Fix #20609
Diffstat (limited to 'modules/ssh')
-rw-r--r--modules/ssh/init.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/ssh/init.go b/modules/ssh/init.go
index f6332bb18b..72cb6df7a4 100644
--- a/modules/ssh/init.go
+++ b/modules/ssh/init.go
@@ -18,6 +18,7 @@ import (
func Init() error {
if setting.SSH.Disabled {
+ builtinUnused()
return nil
}