Closed cgay closed 9 years ago
To be clear, the problem is that #f
gets into the server-listeners vector, not an invalid listener instance. The only mutations to server-listeners are via add!(..., listener) and remove!(..., listener) so it's pretty clear to me that the #f
is due to the default fill for the vector. The f-i-p computes the limit at the outset of the iteration and doesn't re-check it. I don't see what else this could be.
I don't mind coding this the same way as join-clients (using with-lock) if you prefer.
You're iterating over server-listeners
using this:
for (listener in server.server-listeners)
...
end for;
Instead, you should:
while (~empty?(server.server-listeners))
...
end;
Updated.
I think it is worth understanding how invalid listeners are ending up in the vector ... or if this is what happens when doing a f-i-p over a mutating stretchy vector.