aboutsummaryrefslogtreecommitdiff
path: root/internal/imap/commando.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-28 13:22:17 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-28 13:22:17 +0100
commit4f112c16dfac61deb128b48e9d516f78ab55fc95 (patch)
treec9cb69966987ec59fc2eaf20b4fa377056e1f8f8 /internal/imap/commando.go
parentc407994dd3aeb2c5a8e5f3fa070e7436fe308fc9 (diff)
downloadfeed2imap-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.go6
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() {