Merge pull request #54 from s723138643/master

if there is no data to send, we should unregister WRITE event
This commit is contained in:
Bora M. Alper 2017-04-29 15:12:34 +04:00 committed by GitHub
commit 2251664dbd

View File

@ -167,6 +167,8 @@ def loop() -> None:
fileobj = keymap[fd].fileobj
if fileobj.would_send():
selector.modify(fileobj, selectors.EVENT_READ | selectors.EVENT_WRITE)
else:
selector.modify(fileobj, selectors.EVENT_READ)
def parse_cmdline_arguments() -> typing.Optional[argparse.Namespace]: