We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f745670 commit 5538af6Copy full SHA for 5538af6
internal/sync/sync.go
@@ -266,15 +266,15 @@ const (
266
// Returns remote protocol version as a string.
267
// Or, an error if one exists.
268
func (s Sync) Version() (string, error) {
269
+ ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
270
+ defer cancel()
271
+
272
conn, err := s.Client.DialWsep(ctx, s.Env)
273
if err != nil {
274
return "", err
275
}
276
defer conn.Close(websocket.CloseNormalClosure, "")
277
- ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
- defer cancel()
-
278
execer := wsep.RemoteExecer(conn)
279
process, err := execer.Start(ctx, wsep.Command{
280
Command: "rsync",
0 commit comments