Commit f6b55c60 authored by Michael Graff's avatar Michael Graff
Browse files

add TODO, fix a bug with a name that vanishes/does not exist

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent ff751175
== TODO for MsgQ
* The code could use some refactoring.
* Refactor: Right now, the MsgQ class manages each connection using several
lists. There should be a Client class which holds most of this per-client
data. Some will need to remain in the main "driver" MsgQ class (such as the
list of clients and their lnames) but buffer management, reading from a
socket, etc. could all go into this client class.
* More tests: A test to send to strange locations should be added, to test
that code path (a bug which I am committing with this file...)
......@@ -250,7 +250,10 @@ class MsgQ:
if to == "*":
sockets = self.subs.find(group, instance)
sockets = [ self.lnames[to] ]
if to in self.lnames:
sockets = [ self.lnames[to] ]
return # recipient doesn't exist
msg = self.preparemsg(routing, data)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment