Fixed a recursive function call inside giambio.socket.AsyncSocket class

This commit is contained in:
nocturn9x 2020-03-24 08:41:23 +00:00
parent 1308135f12
commit 92835cf0d7
2 changed files with 4 additions and 3 deletions

View File

@ -51,5 +51,3 @@ class AsyncSocket(object):
def __repr__(self):
return f"giambio.socket.AsyncSocket({self.sock}, {self.loop})"
def __getattribute__(self, item):
return self.sock.__getattribute__(item)

View File

@ -39,4 +39,7 @@ async def echo_server(sock: AsyncSocket, addr: tuple):
logging.info(f"Connection from {addr} closed")
loop.start(make_srv, ('', 1501))
try:
loop.start(make_srv, ('', 1501))
except KeyboardInterrupt: # Exceptions propagate!
pass