sorz/sstp-server

AttributeError: 'SSTPProtocol' object has no attribute 'transport'

arpitest opened this issue · 1 comments

i keep getting such errors dumped to stderr, probably caused by non-sstp clients tryting to connect to the server:

2023-04-03 08:02:26,470 ERROR: Exception in callback SSTPProtocol.hello_timer_expired(close=False)()
handle: <TimerHandle when=33316.876951445 SSTPProtocol.hello_timer_expired(close=False)()>
Traceback (most recent call last):
File "/usr/lib64/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/lib64/python3.7/site-packages/sstp_server-0.6.0-py3.7-linux-x86_64.egg/sstpd/sstp.py", line 532, in hello_timer_expired
self.transport.close() # TODO: follow HTTP
AttributeError: 'SSTPProtocol' object has no attribute 'transport'

tisj commented

The transport attribute (self.transport) is set when connection_made is called, see https://docs.python.org/3/library/asyncio-protocol.html#base-protocol

So it seems that the connection was never fully established... maybe due to a port scan?

   def connection_made(self, transport):
        self.transport = transport