parent
11ade023e8
commit
99b4663ce7
1 changed files with 8 additions and 3 deletions
|
@ -358,7 +358,10 @@ class Bot(object):
|
||||||
self._post_send_factory(server, lines))
|
self._post_send_factory(server, lines))
|
||||||
self._event_queue.put(event_item)
|
self._event_queue.put(event_item)
|
||||||
elif fd in poll_sources:
|
elif fd in poll_sources:
|
||||||
poll_sources[fd].is_writeable(fd)
|
def _trigger(source, fd):
|
||||||
|
print("write _trigger")
|
||||||
|
return lambda: source.is_writeable(fd)
|
||||||
|
self.trigger(_trigger(poll_sources[fd], fd))
|
||||||
|
|
||||||
def _read_loop(self):
|
def _read_loop(self):
|
||||||
poll_sources = {}
|
poll_sources = {}
|
||||||
|
@ -385,8 +388,10 @@ class Bot(object):
|
||||||
self._rtrigger_server.recv(1024)
|
self._rtrigger_server.recv(1024)
|
||||||
self._rtriggered = False
|
self._rtriggered = False
|
||||||
elif fd in poll_sources:
|
elif fd in poll_sources:
|
||||||
poll_sources[fd].is_readable(fd)
|
def _trigger(source, fd):
|
||||||
self.trigger_write()
|
print("read _trigger")
|
||||||
|
return lambda: source.is_readable(fd)
|
||||||
|
self.trigger(_trigger(poll_sources[fd], fd))
|
||||||
else:
|
else:
|
||||||
if not fd in self.servers:
|
if not fd in self.servers:
|
||||||
self._read_poll.unregister(fd)
|
self._read_poll.unregister(fd)
|
||||||
|
|
Loading…
Reference in a new issue