INNER CODE UNIT · Go
func
yahoo/vssh · client.go:403
func (c *connect) run(v *VSSH) {
c.connect()
}
// SetTimeout sets timeout for the given response
func (r *Response) setTimeout(t time.Duration) {
r.toCancel = make(chan struct{})
go func() {
select {
case <-r.toCancel:
return
case <-time.After(t):
r.err = TimeoutError{errTimeout}
r.session.Close()
}
}()
}