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

Command queue inconsistency #64

Closed
jimirocks opened this issue Dec 14, 2019 · 2 comments
Closed

Command queue inconsistency #64

jimirocks opened this issue Dec 14, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@jimirocks
Copy link
Contributor

pro 14 13:06:37 heart java[29079]: 2019-12-14 13:06:37.330 DEBUG 29079 --- [   scheduling-1] cz.smarteon.loxone.LoxoneWebSocket       : Sending websocket message: jdev/sps/io/1471d837-00ec-90e3-ffffc0f606ef595c/Pulse
pro 14 13:06:37 heart java[29079]: 2019-12-14 13:06:37.427 ERROR 29079 --- [ctReadThread-36] cz.smarteon.loxone.LoxoneWebSocket       : No command expected!
pro 14 13:06:37 heart java[29079]: java.util.NoSuchElementException: null
pro 14 13:06:37 heart java[29079]:         at java.util.AbstractQueue.remove(AbstractQueue.java:117) ~[na:1.8.0_212]
pro 14 13:06:37 heart java[29079]:         at cz.smarteon.loxone.LoxoneWebSocket.processMessage(LoxoneWebSocket.java:324) ~[loxone-java-0.5.1.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at cz.smarteon.loxone.LoxoneWebsocketClient.onMessage(LoxoneWebsocketClient.java:90) [loxone-java-0.5.1.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:462) [Java-WebSocket-1.3.8.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:696) [Java-WebSocket-1.3.8.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:367) [Java-WebSocket-1.3.8.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:212) [Java-WebSocket-1.3.8.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:389) [Java-WebSocket-1.3.8.jar!/:na]
pro 14 13:06:37 heart java[29079]:         at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]

@jimirocks jimirocks added the bug Something isn't working label Dec 14, 2019
@jimirocks
Copy link
Contributor Author

The problem is probably

void sendInternal(final Command command) {
        webSocketClient.send(command.getCommand());
        // it can happen the response on command is received here
        if (! KEEP_ALIVE.getCommand().equals(command.getCommand())) {
            commands.add(command);
        }
    }

@jimirocks
Copy link
Contributor Author

Accepted as known limitation #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant