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

io.moquette.broker.SessionCorruptedException: Session has already changed state: Session{clientId='xxx', clean=true, status=CONNECTING, inflightSlots=10} #821

Open
blankbro opened this issue Feb 23, 2024 · 3 comments

Comments

@blankbro
Copy link

Expected behavior

no exception

Actual behavior

throw io.moquette.broker.SessionCorruptedException

Steps to reproduce

  1. client send connect
  2. server send connack, but send failed

Minimal yet complete reproducer code (or URL to code) or complete log file

io.moquette.broker.SessionCorruptedException: Session has already changed state: Session{clientId='xxx', clean=true, status=CONNECTING, inflightSlots=10}
at io.moquette.broker.SessionRegistry.purgeSessionState(SessionRegistry.java:415)
at io.moquette.broker.SessionRegistry.connectionClosed(SessionRegistry.java:403)
at io.moquette.broker.MQTTConnection$1.operationComplete(MQTTConnection.java:321)

Moquette MQTT version

0.17

JVM version (e.g. java -version)

1.8

OS version (e.g. uname -a)

mac & linux

@blankbro
Copy link
Author

maybe add filedConnection() to Session.java

    boolean filedConnection() {
        return assignState(Session.SessionStatus.CONNECTING, Session.SessionStatus.DISCONNECTED);
    }

and add bindedSession.filedConnection() before MQTTConnection.java:321

    bindedSession.filedConnection();
    sessionRegistry.connectionClosed(bindedSession); // MQTTConnection.java:321

@andsel
Copy link
Collaborator

andsel commented Mar 24, 2024

@blankbro thanks for reporting this. Do you have some simple way to test and reproduce locally the same error?

@blankbro
Copy link
Author

blankbro commented Mar 25, 2024

@blankbro thanks for reporting this. Do you have some simple way to test and reproduce locally the same error?

😅 No, I don't.

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

No branches or pull requests

2 participants