Skip to content

Commit

Permalink
Add ability to end idle status
Browse files Browse the repository at this point in the history
  • Loading branch information
iragsdale committed Oct 9, 2014
1 parent c2feb2e commit 796926b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions imap/imap.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,18 @@ func (c *Client) IdleTerm() (cmd *Command, err error) {
return
}

func (c *Client) IdleEnd() (cmd *Command, err error) {
if len(c.tags) == 1 {
if cmd = c.cmds[c.tags[0]]; cmd.name == "IDLE" {
err = c.t.WriteLine([]byte("DONE"))
if err == nil {
err = c.t.Flush()
}
}
}
return
}

// ID provides client identification information to the server. See RFC 2971 for
// additional information.
func (c *Client) ID(info ...string) (cmd *Command, err error) {
Expand Down

0 comments on commit 796926b

Please sign in to comment.