Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block bug for TLS? #213

Open
snpcp opened this issue May 18, 2023 · 5 comments
Open

Block bug for TLS? #213

snpcp opened this issue May 18, 2023 · 5 comments
Labels

Comments

@snpcp
Copy link

snpcp commented May 18, 2023

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

@snpcp snpcp added the bug label May 18, 2023
@snpcp
Copy link
Author

snpcp commented May 18, 2023

the port is 465. it's TLS port, but not use setStarttls and setSsl.

@gaol
Copy link
Member

gaol commented May 18, 2023

@snpcp will it work for you if calling setSsl(true) ?

@snpcp
Copy link
Author

snpcp commented May 18, 2023

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.

@snpcp
Copy link
Author

snpcp commented May 18, 2023

above all, don't block for anytime.

@snpcp
Copy link
Author

snpcp commented May 18, 2023

Look like not set SMTPConnection.errorHandler.

  1. connect fail -> set errorHandler
  2. read message -> set errorHandler
  3. 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);
        }
      }
    });
  } 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants