-
Notifications
You must be signed in to change notification settings - Fork 34
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
Is not possible to redeploy a shared MailClient Verticle #170
Comments
Should the On the mail client closing, the internal pool with the shared clients gets closed when there is no reference from MailClient instances to it. The mail client lacks good way to close because the closing actually takes time like sending QUIT for some existing connections in pool, so I made a branch at: https://github.com/gaol/vertx-mail-client/tree/async_mailclient_close to add this support. then |
I have no idea how to test a branch, If I download the code I get a bunch of dependency errors |
you should use the sonatype oss snapshot repository @yazalulloa |
|
How do I set the dependency? I tried this:
But did not work |
I'm trying to redeploy a Verticle with Mail Client, trying to change the configuration of the client without restarting the application.
I'm getting this error:
java.lang.IllegalStateException: Client is closed
at io.vertx.core.net.impl.NetClientImpl.checkClosed(NetClientImpl.java:176)
at io.vertx.core.net.impl.NetClientImpl.connectInternal(NetClientImpl.java:220)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:207)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:122)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:117)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:107)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:102)
at io.vertx.ext.mail.impl.SMTPEndPoint.connect(SMTPEndPoint.java:70)
at io.vertx.core.net.impl.pool.SimpleConnectionPool.connect(SimpleConnectionPool.java:263)
at io.vertx.core.net.impl.pool.SimpleConnectionPool$Acquire$3.run(SimpleConnectionPool.java:591)
at io.vertx.core.net.impl.pool.CombinerExecutor.submit(CombinerExecutor.java:50)
at io.vertx.core.net.impl.pool.SimpleConnectionPool.execute(SimpleConnectionPool.java:254)
at io.vertx.core.net.impl.pool.SimpleConnectionPool.acquire(SimpleConnectionPool.java:634)
at io.vertx.core.net.impl.pool.SimpleConnectionPool.acquire(SimpleConnectionPool.java:638)
at io.vertx.ext.mail.impl.SMTPEndPoint.requestConnection(SMTPEndPoint.java:61)
at io.vertx.core.net.impl.pool.Endpoint.getConnection(Endpoint.java:41)
at io.vertx.ext.mail.impl.SMTPConnectionPool.getConnection0(SMTPConnectionPool.java:155)
at io.vertx.ext.mail.impl.SMTPConnectionPool.getConnection(SMTPConnectionPool.java:102)
at io.vertx.ext.mail.impl.MailClientImpl.getConnection(MailClientImpl.java:119)
at io.vertx.ext.mail.impl.MailClientImpl.lambda$sendMail$2(MailClientImpl.java:103)
at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:832)
This is the code:
this is mail_config.yaml:
I'm using version 4.1.5
What would be the correct way to close a shared MailClient and open a new one?
I tried with creating an individual client (not shared), and works perfectly
The text was updated successfully, but these errors were encountered: