overwriting connect no longer needed

This commit is contained in:
xfnw 2021-07-10 19:25:52 -04:00
parent ebd6f4b7d0
commit bd18b48b26
1 changed files with 0 additions and 24 deletions

24
bot.py
View File

@ -14,30 +14,6 @@ from config import *
class Server(BaseServer):
# overwrite connect so i can put try except blocks there
async def connect(self,
transport: ITCPTransport,
params: ConnectionParams):
try:
await sts_transmute(params)
await resume_transmute(params)
reader, writer = await transport.connect(
params.host,
params.port,
tls =params.tls,
tls_verify=params.tls_verify,
bindhost =params.bindhost)
self._reader = reader
self._writer = writer
self.params = params
await self.handshake()
except:
print('connection with {} failed, disconnecting'.format(self.name))
self.disconnected = True
async def line_read(self, line: Line):
print(f"{self.name} < {line.format()}")
if line.command == "001":