cloudproxy: agent: ssh: cancel on return from Start

This commit is contained in:
Yousong Zhou
2021-04-06 13:02:34 +08:00
parent 8701114f78
commit ed061d0821
+3
View File
@@ -143,6 +143,9 @@ func (c *Client) Stop(ctx context.Context) {
}
func (c *Client) Start(ctx context.Context) {
ctx, cancelFunc := context.WithCancel(ctx)
defer cancelFunc()
pingT := time.NewTimer(17 * time.Second)
pingFailCount := 0
const pingMaxFail = 3