cleanup (millisecond timeout instead of second, unnecessary conditional)

This commit is contained in:
Alexander Weinhold 2017-08-14 18:22:50 +02:00
parent f6d6824bca
commit ca1e6261e9
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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")