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

[orbitbhyve] Handle WebSocketException to prevent scheduled ping job failure #12944

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

mhilbush
Copy link
Contributor

This WebSocketException during the scheduled job execution causes the scheduled ping job to fail. This PR catches WebSocketException during the scheduled ping job execution (and at other points in the binding where it's thrown).

2022-06-07 21:12:35.605 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
org.eclipse.jetty.websocket.api.WebSocketException: Session closed
        at org.eclipse.jetty.websocket.common.WebSocketSession.outgoingFrame(WebSocketSession.java:350) ~[?:?]
        at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.uncheckedSendFrame(WebSocketRemoteEndpoint.java:322) ~[?:?]
        at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.blockingWrite(WebSocketRemoteEndpoint.java:109) ~[?:?]
        at org.eclipse.jetty.websocket.common.WebSocketRemoteEndpoint.sendString(WebSocketRemoteEndpoint.java:400) ~[?:?]
        at org.openhab.binding.orbitbhyve.internal.handler.OrbitBhyveBridgeHandler.ping(OrbitBhyveBridgeHandler.java:182) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

Signed-off-by: Mark Hilbush mark@hilbush.com

Signed-off-by: Mark Hilbush <mark@hilbush.com>
@mhilbush mhilbush added the bug An unexpected problem or unintended behavior of an add-on label Jun 16, 2022
@mhilbush mhilbush requested a review from octa22 as a code owner June 16, 2022 11:45
Copy link
Contributor

@octa22 octa22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lolodomo lolodomo merged commit 740f843 into openhab:main Jun 17, 2022
@lolodomo lolodomo added this to the 3.3 milestone Jun 17, 2022
@mhilbush mhilbush deleted the bhyve-fix-websocket-exception branch June 18, 2022 16:36
leifbladt pushed a commit to leifbladt/openhab-addons that referenced this pull request Oct 15, 2022
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
…2944)

Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants