Merge pull request #54 from s723138643/master
if there is no data to send, we should unregister WRITE event
This commit is contained in:
commit
2251664dbd
@ -167,6 +167,8 @@ def loop() -> None:
|
|||||||
fileobj = keymap[fd].fileobj
|
fileobj = keymap[fd].fileobj
|
||||||
if fileobj.would_send():
|
if fileobj.would_send():
|
||||||
selector.modify(fileobj, selectors.EVENT_READ | selectors.EVENT_WRITE)
|
selector.modify(fileobj, selectors.EVENT_READ | selectors.EVENT_WRITE)
|
||||||
|
else:
|
||||||
|
selector.modify(fileobj, selectors.EVENT_READ)
|
||||||
|
|
||||||
|
|
||||||
def parse_cmdline_arguments() -> typing.Optional[argparse.Namespace]:
|
def parse_cmdline_arguments() -> typing.Optional[argparse.Namespace]:
|
||||||
|
Loading…
Reference in New Issue
Block a user