diff options
author | Robin Jarry <robin@jarry.cc> | 2023-01-06 22:49:26 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-01-06 23:51:58 +0100 |
commit | 915b869e3fc6377be114c033763987de612c443c (patch) | |
tree | 95a2165a06cbda9ad0d092ac1b3816f50daa52c1 /commands/msg | |
parent | 175c1c822084d0f42892729c8e095397bd830966 (diff) | |
download | aerc-915b869e3fc6377be114c033763987de612c443c.tar.gz |
lint: add missing panic handlers in goroutines
These issues were all reported by the new custom analyzer introduced in
previous commit.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/pipe.go | 1 | ||||
-rw-r--r-- | commands/msg/unsubscribe.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index 878fd18c..fc1ac8f8 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -236,6 +236,7 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error { func newMessagesReader(messages []*types.FullMessage, useMbox bool) io.Reader { pr, pw := io.Pipe() go func() { + defer log.PanicHandler() defer pw.Close() for _, msg := range messages { var err error diff --git a/commands/msg/unsubscribe.go b/commands/msg/unsubscribe.go index 66797660..37ed707f 100644 --- a/commands/msg/unsubscribe.go +++ b/commands/msg/unsubscribe.go @@ -183,6 +183,7 @@ func unsubscribeHTTP(aerc *widgets.Aerc, u *url.URL) error { switch option { case "Yes": go func() { + defer log.PanicHandler() if err := lib.XDGOpen(u.String()); err != nil { aerc.PushError("Unsubscribe:" + err.Error()) } |