geventconnpool
geventconnpool copied to clipboard
Generic TCP connection pool for gevent-based applications
Can it connect locally? I use it like this: ``` class MyPool(ConnectionPool): def _new_connection(self): s = socket.create_connection(('192.168.0.92', 8090)) s._sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) return s pools = MyPool(2) with pools.get() as c:...
I currently instantiate my pool like this: ``` class EPPPool(ConnectionPool): def _new_connection(self): try: return EPPSession(self.config) except Exception as e: # If the pool fails to start or gets too small,...
code fixes