aerc/worker/imap
Robin Jarry 6ddfc23e61 imap: fix segfault when disconnecting
Do not set client = nil, it breaks almost all message handlers:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8c7e51]
goroutine 25 [running]:
  git.sr.ht/~rjarry/aerc/worker/imap.(*IMAPWorker).handleListDirectories
    worker/imap/list.go:32
  git.sr.ht/~rjarry/aerc/worker/imap.(*IMAPWorker).handleMessage
    worker/imap/worker.go:174
  git.sr.ht/~rjarry/aerc/worker/imap.(*IMAPWorker).Run
    worker/imap/worker.go:264
  created by git.sr.ht/~rjarry/aerc/widgets.NewAccountView
    widgets/account.go:85 +0x518

Simply leave the disconnected client object, it already returns explicit
error messages.

Fixes: e41ed82cf3 ("imap: add manual {dis,}connect support")
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-22 21:32:56 +01:00
..
create.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
fetch.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
flags.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
imap.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
list.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
movecopy.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
open.go messages: allow displaying email threads 2021-11-13 15:05:59 +01:00
remove.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
search.go Add flag based search options 2020-07-25 08:08:08 +02:00
worker.go imap: fix segfault when disconnecting 2021-11-22 21:32:56 +01:00