-
Notifications
You must be signed in to change notification settings - Fork 173
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
New client with same daemon creates new IRC session unnecessarily #44
Comments
Note that this does not occur in all-in-one mode ( |
Isn't the current behaviour correct? Assume a single jmdaemon is used by multiple clients, they all will require different nicks and thus different connections. |
@undeath's response to this very old issue was correct in as far as it goes. The problem was slightly wrongly characterised by me here. On the one hand, starting a new protocol instance, with a new nick, clearly is correct. The problem I was observing here was just a result of the fact that there was not a 'shut down message channels' event on the completion of a task while the process is still running. This obviously didn't matter for one-and-done scripts where jmclient and jmdaemon were running in the same process, but did for a distinct I believe the problem was partially fixed, but only in new usage contexts, by the inclusion of
and
but I believe the problem would still exist for a user running a remote Assuming this analysis is still correct, it shows up something about refactoring the codebase pretty clearly:
|
If joinmarketd is run persistently with new clients connecting, new instances of
JMDaemonServerProtocol
are created, meaning that the member variableself.irc_config
is reset to None, meaning a new IRC session + nick is created even though the IRC config is the same.The parts of the class instance which manage the connection should therefore be class variables, but this requires a bit of work. At least the messagechannelcollection object must be thus, and also it seems the orderbookwatch related data. So this is a bit more of a rework than I'd thought it would be. Also there might be something simpler than moving to class variables, perhaps moving these elements to the
JMDaemonServerProtocolFactory
, not sure.This isn't labeled as a bug because it does not break functionality, but any long running daemon used repeatedly by clients will create a bunch of useless IRC connections, so it nearly counts. Should be fixed soon.
The text was updated successfully, but these errors were encountered: