vertx-mail-client
vertx-mail-client copied to clipboard
Block bug for TLS?
Code:
... MailConfig { host: xxx; port: xxx; ssl: false; connect timeout: 3000ms read timeout : 3000ms write timeout: 3000ms idle timeout: 6000ms }
Use tls port, but use setSsl(false), No event of ofFail() and thread blocked.
Version: vertx-core & vertx-mail-client 4.3.5 OS: MAC
the port is 465. it's TLS port, but not use setStarttls and setSsl.
@snpcp will it work for you if calling setSsl(true)
?
yes, setSsl -> true, I see socket close ex...
. it's normal.
I hope see exception, because port is TLS, but not handshake. so it must be ofFail.
above all, don't block for anytime.
Look like not set SMTPConnection.errorHandler
.
- connect fail -> set errorHandler
- read message -> set errorHandler
- connect success & not handshake & close connect -> not set errorHandler
private void handleError(Throwable t) {
context.emit(t, err -> {
Handler<Throwable> handler;
synchronized (SMTPConnection.this) {
handler = errorHandler;
}
if (handler != null) {
handler.handle(err);
} else {
if (log.isDebugEnabled()) {
log.debug(t.getMessage(), t);
}
}
});
}