diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-02-28 13:22:17 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2021-02-28 13:22:17 +0100 |
commit | 4f112c16dfac61deb128b48e9d516f78ab55fc95 (patch) | |
tree | c9cb69966987ec59fc2eaf20b4fa377056e1f8f8 /internal/imap/commando.go | |
parent | c407994dd3aeb2c5a8e5f3fa070e7436fe308fc9 (diff) | |
download | feed2imap-go-4f112c16dfac61deb128b48e9d516f78ab55fc95.tar.gz feed2imap-go-4f112c16dfac61deb128b48e9d516f78ab55fc95.tar.bz2 feed2imap-go-4f112c16dfac61deb128b48e9d516f78ab55fc95.zip |
Start IMAP connections in the background and use them on the go
Diffstat (limited to 'internal/imap/commando.go')
-rw-r--r-- | internal/imap/commando.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/imap/commando.go b/internal/imap/commando.go index 1ba4ed3..2edbc58 100644 --- a/internal/imap/commando.go +++ b/internal/imap/commando.go @@ -50,11 +50,11 @@ func (cl *Client) startCommander() { cl.commander = &commander{cl, pipe, done} - for _, conn := range cl.connections { - if conn != nil { + go func() { + for conn := range cl.connChannel { go executioner(conn, pipe, done) } - } + }() } func (cl *Client) stopCommander() { |