mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	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
This commit is contained in:
		@@ -91,6 +91,7 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
 | 
				
			|||||||
						return
 | 
											return
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										req.Reply(true, nil);
 | 
				
			||||||
					go io.Copy(input, ch)
 | 
										go io.Copy(input, ch)
 | 
				
			||||||
					io.Copy(ch, stdout)
 | 
										io.Copy(ch, stdout)
 | 
				
			||||||
					io.Copy(ch.Stderr(), stderr)
 | 
										io.Copy(ch.Stderr(), stderr)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user