#661 server_event calls ondrain once if writing data from ondrain
What steps will reproduce the problem?
1. Write a thing that sends data in chunks from a listener.ondrain() callback
2. Run it on server_event
What is the expected output?
Everything being awesome!
What do you see instead?
ondrain only called once
This seems to be because writecallback() doesn't check if the write buffer is still empty after a successful write (and calling ondrain) and then has the event removed.