Skip to content

Commit

Permalink
fix: set timeout 3s
Browse files Browse the repository at this point in the history
  • Loading branch information
ttktatakai committed May 30, 2024
1 parent 4523658 commit deef816
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/pkg/server/controller/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ func connectSsh(ctx *gin.Context, req *gsession.SshReq, chs *gsession.SessionCha
ssh.Password(conf.Cfg.SshServer.Password),
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
Timeout: time.Second * 3,
}
conn, err := ssh.Dial("tcp", fmt.Sprintf("%s:%d", conf.Cfg.SshServer.Ip, conf.Cfg.SshServer.Port), cfg)
if err != nil {
Expand Down

0 comments on commit deef816

Please sign in to comment.