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

Remove duplicate log under the case of session take over. #106

Closed
DrmagicE opened this issue Jun 5, 2021 · 0 comments · Fixed by #107
Closed

Remove duplicate log under the case of session take over. #106

DrmagicE opened this issue Jun 5, 2021 · 0 comments · Fixed by #107
Assignees

Comments

@DrmagicE
Copy link
Owner

DrmagicE commented Jun 5, 2021

When receiving a connection with a duplicate client id, gmqtt will print lots of duplicate logs in some situations, which is unnecessary and confusing.

2021-06-05T12:58:14.047+0800    INFO    server/server.go:497    logged in with new session      {"remote_addr": "127.0.0.1:58599", "client_id": "testing"}
2021-06-05T12:58:20.709+0800    INFO    server/server.go:323    logging with duplicate ClientID {"remote": "127.0.0.1:58600", "client_id": "testing"}
2021-06-05T12:58:20.709+0800    ERROR   server/client.go:247    connection lost {"client_id": "testing", "error": "operation error: Code = 8e, reasonString: "}
github.com/DrmagicE/gmqtt/server.(*client).setError.func1
        /usr/local/gopath/src/github.com/DrmagicE/gmqtt/server/client.go:247
sync.(*Once).doSlow
        /usr/local/go/src/sync/once.go:66
sync.(*Once).Do
        /usr/local/go/src/sync/once.go:57
github.com/DrmagicE/gmqtt/server.(*client).setError
        /usr/local/gopath/src/github.com/DrmagicE/gmqtt/server/client.go:245
github.com/DrmagicE/gmqtt/server.(*server).lockDuplicatedID
        /usr/local/gopath/src/github.com/DrmagicE/gmqtt/server/server.go:327
github.com/DrmagicE/gmqtt/server.(*server).registerClient
        /usr/local/gopath/src/github.com/DrmagicE/gmqtt/server/server.go:346
github.com/DrmagicE/gmqtt/server.(*client).connectWithTimeOut
        /usr/local/gopath/src/github.com/DrmagicE/gmqtt/server/client.go:674
github.com/DrmagicE/gmqtt/server.(*client).serve
        /usr/local/gopath/src/github.com/DrmagicE/gmqtt/server/client.go:1391
2021-06-05T12:58:20.709+0800    INFO    server/server.go:323    logging with duplicate ClientID {"remote": "127.0.0.1:58600", "client_id": "testing"}
2021-06-05T12:58:20.709+0800    INFO    server/server.go:323    logging with duplicate ClientID {"remote": "127.0.0.1:58600", "client_id": "testing"}
2021-06-05T12:58:20.709+0800    INFO    server/server.go:323    logging with duplicate ClientID {"remote": "127.0.0.1:58600", "client_id": "testing"}
2021-06-05T12:58:20.709+0800    INFO    server/server.go:323    logging with duplicate ClientID {"remote": "127.0.0.1:58600", "client_id": "testing"}
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 a pull request may close this issue.

1 participant