diff options
author | Robin Jarry <robin@jarry.cc> | 2021-11-22 21:31:42 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2021-11-22 21:32:56 +0100 |
commit | 6ddfc23e617ad66bd98d980b22d01bf0fe20ec10 (patch) | |
tree | ca698b93636f204669a4ce1e252d44a1994e5873 /worker/notmuch/message.go | |
parent | ec58090474b37cb46b332cb9bb90e2e33d4a0f67 (diff) | |
download | aerc-6ddfc23e617ad66bd98d980b22d01bf0fe20ec10.tar.gz |
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: e41ed82cf3db ("imap: add manual {dis,}connect support")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/notmuch/message.go')
0 files changed, 0 insertions, 0 deletions