diff --git a/cmd/config_job_local.go b/cmd/config_job_local.go index 41f8219..e9e1d2c 100644 --- a/cmd/config_job_local.go +++ b/cmd/config_job_local.go @@ -99,7 +99,7 @@ func (j *LocalJob) JobStart(ctx context.Context) { // We can pay this small performance penalty for now. wildcardMapFilter := NewDatasetMapFilter(1, false) wildcardMapFilter.Add("<", "<") - sender := &endpoint.Sender{wildcardMapFilter, NewPrefixFilter(j.SnapshotPrefix)} + sender := endpoint.NewSender(wildcardMapFilter, NewPrefixFilter(j.SnapshotPrefix)) receiver, err := endpoint.NewReceiver(j.Mapping, NewPrefixFilter(j.SnapshotPrefix)) if err != nil { diff --git a/zfs/resume_token.go b/zfs/resume_token.go index 5bf1632..e83c8f2 100644 --- a/zfs/resume_token.go +++ b/zfs/resume_token.go @@ -48,7 +48,8 @@ func ParseResumeToken(ctx context.Context, token string) (*ResumeToken, error) { // toname = pool1/test@b //cannot resume send: 'pool1/test@b' used in the initial send no longer exists - ctx, _ = context.WithTimeout(ctx, 500*time.Millisecond) + ctx, cancel := context.WithTimeout(ctx, 500*time.Millisecond) + defer cancel() cmd := exec.CommandContext(ctx, ZFS_BINARY, "send", "-nvt", string(token)) output, err := cmd.CombinedOutput() if err != nil {