diff --git a/src/smtpclient.cpp b/src/smtpclient.cpp index 27b8e63..a3b326c 100644 --- a/src/smtpclient.cpp +++ b/src/smtpclient.cpp @@ -250,8 +250,8 @@ bool SmtpClient::waitForReadyConnected(int msec) { if (isReadyConnected) return true; - loop.exec(); QTimer::singleShot(msec, &loop, SLOT(quit())); + loop.exec(); return isReadyConnected; } @@ -266,8 +266,8 @@ bool SmtpClient::waitForAuthenticated(int msec) { if (isAuthenticated) return true; - loop.exec(); QTimer::singleShot(msec, &loop, SLOT(quit())); + loop.exec(); return isAuthenticated; } @@ -282,8 +282,8 @@ bool SmtpClient::waitForMailSent(int msec) { if (isMailSent) return true; + QTimer::singleShot(msec, &loop, SLOT(quit())); loop.exec(); - QTimer::singleShot(msec, &loop, SLOT(quit())); return isMailSent; } diff --git a/test/connect_data.txt b/test/connect_data.txt index d906c4e..87e9895 100644 --- a/test/connect_data.txt +++ b/test/connect_data.txt @@ -3,7 +3,6 @@ smtp.gmail.com 465 2 smtp.gmail.com 587 3 smtp.mail.yahoo.com 25 1 smtp.mail.yahoo.com 465 2 -smtp.dummysmtp.com 25 1 smtp.1and1.com 25 1 smtp.1and1.com 465 2 smtp.1and1.com 587 3