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

Enabled shared HttpClient and WebSocket; Fixed minor SAT findings; #3

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

cweitkamp
Copy link

  • Enabled shared HttpClient and WebSocket
  • Fixed minor SAT findings;

Signed-off-by: Christoph Weitkamp [email protected]

@octa22
Copy link
Owner

octa22 commented Jul 2, 2019

Hi, thank you very much for the PR, unfortunately the shared HttpClient and WebSocket do not work - the thing initialization results in exception because they are stopped.
Tested on OH 2.4 and 2.5.0M1

2019-07-02 22:34:51.289 [DEBUG] [vektiva.handler.VektivaSmarwiHandler] - Exception during status update
java.util.concurrent.ExecutionException: java.util.concurrent.RejectedExecutionException: HttpClient@650bd76{STOPPED} is stopped
        at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
        at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:684) ~[?:?]
        at org.openhab.binding.vektiva.handler.VektivaSmarwiHandler.checkStatus(VektivaSmarwiHandler.java:173) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.util.concurrent.RejectedExecutionException: HttpClient@650bd76{STOPPED} is stopped
        at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:282) ~[?:?]
        at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:247) ~[?:?]
        at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:578) ~[?:?]
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:727) ~[?:?]
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:680) ~[?:?]

@octa22
Copy link
Owner

octa22 commented Jul 2, 2019

But it seems that it works in latest 2.5.0-SNAPSHOT...
is this possible?

@cweitkamp
Copy link
Author

Did you run an old version of the binding before? Did you try to restart OH after installing the new binding version? I have the slight feeling that both instances got stopped because of your current code.

@octa22
Copy link
Owner

octa22 commented Jul 2, 2019

you are right, the restart did the trick, thank you!

@octa22 octa22 merged commit dc50cd5 into octa22:vektiva-binding Jul 2, 2019
octa22 added a commit that referenced this pull request Jul 2, 2019
Enabled shared HttpClient and WebSocket; Fixed minor SAT findings;

Signed-off-by: Ondrej Pecta <[email protected]>
@cweitkamp cweitkamp deleted the pr-4626 branch July 3, 2019 05:24
octa22 added a commit that referenced this pull request Jul 3, 2019
Enabled shared HttpClient and WebSocket; Fixed minor SAT findings;

Signed-off-by: Ondrej Pecta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants