forked from Silverfish/proton-bridge
GODT-1159 SMTP server not restarting after restored internet
- [x] write tests to check that IMAP and SMTP servers are closed when there is no internet - [x] always create new go-smtp instance during listenAndServe(int)
This commit is contained in:
@ -43,6 +43,9 @@ type IMAPClient struct {
|
||||
func NewIMAPClient(t TestingT, tag string, imapAddr string) *IMAPClient {
|
||||
conn, err := net.Dial("tcp", imapAddr)
|
||||
require.NoError(t, err)
|
||||
if err != nil {
|
||||
return &IMAPClient{}
|
||||
}
|
||||
response := bufio.NewReader(conn)
|
||||
|
||||
// Read first response to opening connection.
|
||||
|
||||
Reference in New Issue
Block a user