-
Notifications
You must be signed in to change notification settings - Fork 5
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
call client.start().get(); on stopped client causes error. #7
Comments
You are correct, the intention is to be able to re-start the client. It was working when an external |
I confirm its working. |
Excellent, thank you for taking the time to report the issue. I've pushed out a 0.4.0 release to Maven Central now that includes the fix. |
After about 24 hours of operation, starting the client before reading and closing after reading in 60s intervals, I get an endless loop of the client cannot be started because there is a timeout on closing
|
example code:
17:11:25.512 [globalEventExecutor-2-2 ] WARN io.netty.util.concurrent.DefaultPromise ::notifyListener0 - An exception was thrown by net.solarnetwork.io.modbus.netty.handler.NettyModbusClient$$Lambda$207/0xa93b22d0.operationComplete(): java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@12662c2[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@133e8d6[Wrapped task = net.solarnetwork.io.modbus.netty.handler.NettyModbusClient$$Lambda$211/0xa93f8480@e97581]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@1395e7e[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2057)
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:827)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
at java.base/java.util.concurrent.Executors$DelegatedScheduledExecutorService.schedule(Executors.java:779)
at net.solarnetwork.io.modbus.netty.handler.NettyModbusClient.handleCloseAndScheduleReconnectIfRequired(NettyModbusClient.java:254)
at net.solarnetwork.io.modbus.netty.handler.NettyModbusClient.lambda$handleConnect$2(NettyModbusClient.java:240)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
at io.netty.util.concurrent.DefaultPromise.access$300(DefaultPromise.java:35)
at io.netty.util.concurrent.DefaultPromise$2.run(DefaultPromise.java:531)
at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:243)
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:831)
tried on different serialPort implenentation with same result.
Docs for interface allow that.
The text was updated successfully, but these errors were encountered: