remove unnecessary overwrite
This commit is contained in:
parent
999a54168e
commit
4211184886
2 changed files with 3 additions and 4 deletions
|
@ -176,9 +176,8 @@ class EventLoop(object):
|
|||
def remove_periodic(self, callback):
|
||||
self._periodic_callbacks.remove(callback)
|
||||
|
||||
def modify(self, f, mode, handler):
|
||||
def modify(self, f, mode):
|
||||
fd = f.fileno()
|
||||
self._fdmap[fd] = (f, handler)
|
||||
self._impl.modify(fd, mode)
|
||||
|
||||
def stop(self):
|
||||
|
|
|
@ -173,14 +173,14 @@ class TCPRelayHandler(object):
|
|||
event |= eventloop.POLL_OUT
|
||||
if self._upstream_status & WAIT_STATUS_READING:
|
||||
event |= eventloop.POLL_IN
|
||||
self._loop.modify(self._local_sock, event, self._server)
|
||||
self._loop.modify(self._local_sock, event)
|
||||
if self._remote_sock:
|
||||
event = eventloop.POLL_ERR
|
||||
if self._downstream_status & WAIT_STATUS_READING:
|
||||
event |= eventloop.POLL_IN
|
||||
if self._upstream_status & WAIT_STATUS_WRITING:
|
||||
event |= eventloop.POLL_OUT
|
||||
self._loop.modify(self._remote_sock, event, self._server)
|
||||
self._loop.modify(self._remote_sock, event)
|
||||
|
||||
def _write_to_sock(self, data, sock):
|
||||
# write data to sock
|
||||
|
|
Loading…
Reference in a new issue