diff options
Diffstat (limited to 'commands/msg/pipe.go')
-rw-r--r-- | commands/msg/pipe.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index 5d8a0424..06f2a4d2 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -9,6 +9,7 @@ import ( "time" "git.sr.ht/~rjarry/aerc/commands" + "git.sr.ht/~rjarry/aerc/logging" "git.sr.ht/~rjarry/aerc/widgets" "git.sr.ht/~rjarry/aerc/worker/types" @@ -89,6 +90,8 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { return } go func() { + defer logging.PanicHandler() + defer pipe.Close() io.Copy(pipe, reader) }() @@ -146,6 +149,8 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { }) go func() { + defer logging.PanicHandler() + select { case <-done: break |