-
Notifications
You must be signed in to change notification settings - Fork 230
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
Warning spamming in Transport.onclose #538
Comments
I've noticed that as well. Since upgrading to a recent version of AutobahnJS, there's a lot more (IMO unnecessary) log activity. So I'd also reduce the log level of this line to "debug".
|
The current commit addresses warnings logged in the happy path only. As I mentioned in the ticket "this function logs a "connection closed {reason}" as a warning, when really this would only be a warning if the connection closed were a problematic state." Another issue could address this auto-reconnect logging specifically. |
Reproduction steps
autobahn.Connection.close
on an active connection.This can be observed in the autobahn-js tests: https://travis-ci.org/github/crossbario/autobahn-js
Tech Details
_session.leave is called in autobahn.Connection.close. Ultimately, Transport.onclose is being called when the connection is closed and this function logs a "connection closed {reason}" as a warning, when really this would only be a warning if the connection closed were a problematic state.
My suggestion is to simply use log.debug instead, as this spams stderr needlessly and can lead users to think that something went wrong on disconnection, when everything went well.
The text was updated successfully, but these errors were encountered: