cleanup (millisecond timeout instead of second, unnecessary conditional)
This commit is contained in:
parent
f6d6824bca
commit
ca1e6261e9
|
@ -164,7 +164,7 @@ func cmd(s string) string {
|
|||
}
|
||||
|
||||
func (c *connection) write(s string) {
|
||||
c.Conn.SetWriteDeadline(time.Now().Add(timeout * time.Second))
|
||||
c.Conn.SetWriteDeadline(time.Now().Add(timeout * time.Millisecond))
|
||||
bytes := []byte(s)
|
||||
n, err := c.Conn.Write(bytes)
|
||||
var desc string
|
||||
|
|
|
@ -20,11 +20,9 @@ func main() {
|
|||
par := &unreadMail.Parameters{*serverPtr, *portPtr, *certPtr, *userPtr, *passwdPtr}
|
||||
|
||||
mails, errs := unreadMail.FetchPlaintext(par)
|
||||
if len(errs) > 0 {
|
||||
for _, err := range errs {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
}
|
||||
for _, mail := range mails {
|
||||
fmt.Println(mail)
|
||||
fmt.Println("\n=*=*=*=*=*=*=*=*=\n")
|
||||
|
|
Loading…
Reference in New Issue
Block a user