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) {
|
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)
|
bytes := []byte(s)
|
||||||
n, err := c.Conn.Write(bytes)
|
n, err := c.Conn.Write(bytes)
|
||||||
var desc string
|
var desc string
|
||||||
|
|
|
@ -20,11 +20,9 @@ func main() {
|
||||||
par := &unreadMail.Parameters{*serverPtr, *portPtr, *certPtr, *userPtr, *passwdPtr}
|
par := &unreadMail.Parameters{*serverPtr, *portPtr, *certPtr, *userPtr, *passwdPtr}
|
||||||
|
|
||||||
mails, errs := unreadMail.FetchPlaintext(par)
|
mails, errs := unreadMail.FetchPlaintext(par)
|
||||||
if len(errs) > 0 {
|
|
||||||
for _, err := range errs {
|
for _, err := range errs {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for _, mail := range mails {
|
for _, mail := range mails {
|
||||||
fmt.Println(mail)
|
fmt.Println(mail)
|
||||||
fmt.Println("\n=*=*=*=*=*=*=*=*=\n")
|
fmt.Println("\n=*=*=*=*=*=*=*=*=\n")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user