diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-07-24 01:00:11 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-07-24 01:00:11 +0200 |
commit | 53053c5d8c96dde34dd08963d87edf1c90b16fc4 (patch) | |
tree | 515e5e6722c29543c55a6752d234e0953607d27b /main.go | |
parent | 2c3587a8484ce08dd84b54b9c05a7382945a24bd (diff) | |
download | feed2imap-go-53053c5d8c96dde34dd08963d87edf1c90b16fc4.tar.gz feed2imap-go-53053c5d8c96dde34dd08963d87edf1c90b16fc4.tar.bz2 feed2imap-go-53053c5d8c96dde34dd08963d87edf1c90b16fc4.zip |
Fix IMAP disconnect
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -110,7 +110,10 @@ func run() error { imapErr <- err }() - defer c.Disconnect() + defer func() { + // capture c and not evaluate it, before connect has run + c.Disconnect() + }() } if success := state.Fetch(); success == 0 { |