aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/mbf/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-17 21:30:00 +0900
committerOphestra <cat@gensokyo.uk>2026-04-17 22:00:04 +0900
commit8d657b6fdf5570e3c0324ec5086ee8aad88171ac (patch)
treea286f28f3dc98dab72bacbf65749117a747887ab /cmd/mbf/main.go
parentae9b9adfd28e7ea8609f769473754277334da255 (diff)
cmd/mbf: cancel remote cure
This exposes the new fine-grained cancel API in cmd/mbf. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/mbf/main.go')
-rw-r--r--cmd/mbf/main.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index bee97b01..4369565a 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -479,10 +479,21 @@ func main() {
if flagNoReply {
flags |= remoteNoReply
}
- pathname, err := cureRemote(ctx, &addr, rosa.Std.Load(p), flags)
+ a := rosa.Std.Load(p)
+ pathname, err := cureRemote(ctx, &addr, a, flags)
if !flagNoReply && err == nil {
log.Println(pathname)
}
+
+ if errors.Is(err, context.Canceled) {
+ cc, cancel := context.WithDeadline(context.Background(), daemonDeadline())
+ defer cancel()
+
+ if _err := cancelRemote(cc, &addr, a); _err != nil {
+ log.Println(err)
+ }
+ }
+
return err
}
},