summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDmitry Neverov <dmitry.neverov@gmail.com>2016-01-18 16:52:38 +0100
committerDmitry Neverov <dmitry.neverov@gmail.com>2016-01-18 16:54:10 +0100
commitfb99d50fa1d2d38ef6b4d8fa63c81b27fa6123bd (patch)
treeecac3d009a68104668dc98599a43b64e394ae0ff /modules
parent7ef9a055886574655d9f2be70c957bc16bf30500 (diff)
downloadgitea-fb99d50fa1d2d38ef6b4d8fa63c81b27fa6123bd.tar.gz
gitea-fb99d50fa1d2d38ef6b4d8fa63c81b27fa6123bd.zip
Fix #2431 - handle requests waiting for reply
According to the docs [1], the Reply method must be called for all requests where WantReply is true. This fixes a hanging java ssh implementation (jsch) which sets WantReply flag and waits for reply from the server. [1] https://godoc.org/golang.org/x/crypto/ssh#Request.Reply
Diffstat (limited to 'modules')
-rw-r--r--modules/ssh/ssh.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go
index 15ba02a2b1..41a8706630 100644
--- a/modules/ssh/ssh.go
+++ b/modules/ssh/ssh.go
@@ -91,6 +91,7 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
return
}
+ req.Reply(true, nil);
go io.Copy(input, ch)
io.Copy(ch, stdout)
io.Copy(ch.Stderr(), stderr)