From c209b8076467cc42879bb5f031cd404b2cda3522 Mon Sep 17 00:00:00 2001 From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl> Date: Thu, 12 Jan 2017 15:15:48 +0100 Subject: [PATCH] fixed #16 --- coolamqp/uplink/connection/connection.py | 2 +- coolamqp/uplink/listener/epoll_listener.py | 2 +- tests/run.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/coolamqp/uplink/connection/connection.py b/coolamqp/uplink/connection/connection.py index cb9384f..84e5be3 100644 --- a/coolamqp/uplink/connection/connection.py +++ b/coolamqp/uplink/connection/connection.py @@ -253,7 +253,7 @@ class Connection(object): #todo why is that necessary? it doesnt pass travis CI if there's no this block self.listener_socket.oneshot(delay, callback) except AttributeError: - print(dir(self)) + pass #print(dir(self)) def unwatch_all(self, channel_id): """ diff --git a/coolamqp/uplink/listener/epoll_listener.py b/coolamqp/uplink/listener/epoll_listener.py index 727076b..16e8926 100644 --- a/coolamqp/uplink/listener/epoll_listener.py +++ b/coolamqp/uplink/listener/epoll_listener.py @@ -90,7 +90,7 @@ class EpollListener(object): if sock.on_write(): # I'm done with sending for now assert len(sock.data_to_send) == 0 and len(sock.priority_queue) == 0 - self.epoll.modify(sock.fileno(), RW) + self.epoll.modify(sock.fileno(), RO) except SocketFailed: self.epoll.unregister(fd) diff --git a/tests/run.py b/tests/run.py index 0d79aa5..4c1a859 100644 --- a/tests/run.py +++ b/tests/run.py @@ -25,7 +25,6 @@ if __name__ == '__main__': except AMQPError: print(':)') - while True: - time.sleep(30) + time.sleep(30) amqp.shutdown(True) -- GitLab