aiosmtpd
aiosmtpd copied to clipboard
_trigger_server in infinite loop
I am using aiosmtpd 1.4.6 in an Azure Container App. I have enabled logging. When I start the server on my local machine, I get the following logs:
INFO [2024-07-30 15:10:03,857] - [C:\Users\COCCOV\AppData\Local\pypoetry\Cache\virtualenvs\mail2sms-EP6LIPF2-py3.12\Lib\site-packages\aiosmtpd\smtp.py connection_made 523]: Peer: ('::1', 58365, 0, 0) INFO [2024-07-30 15:10:03,857] - [C:\Users\COCCOV\AppData\Local\pypoetry\Cache\virtualenvs\mail2sms-EP6LIPF2-py3.12\Lib\site-packages\aiosmtpd\smtp.py _handle_client 615]: ('::1', 58365, 0, 0) handling connection INFO [2024-07-30 15:10:03,870] - [C:\Users\COCCOV\AppData\Local\pypoetry\Cache\virtualenvs\mail2sms-EP6LIPF2-py3.12\Lib\site-packages\aiosmtpd\smtp.py eof_received 547]: ('::1', 58365, 0, 0) EOF received INFO [2024-07-30 15:10:03,870] - [C:\Users\COCCOV\AppData\Local\pypoetry\Cache\virtualenvs\mail2sms-EP6LIPF2-py3.12\Lib\site-packages\aiosmtpd\smtp.py _handle_client 761]: ('::1', 58365, 0, 0) Connection lost during _handle_client() INFO [2024-07-30 15:10:03,870] - [C:\Users\COCCOV\AppData\Local\pypoetry\Cache\virtualenvs\mail2sms-EP6LIPF2-py3.12\Lib\site-packages\aiosmtpd\smtp.py connection_lost 530]: ('::1', 58365, 0, 0) connection lost
I think the _trigger_server method in Controller is causing this.
When I run the server in an Azure container app with Ingress enableld my log is endlessly spammed with the output:
Without Ingress, the behaviour is the same as on my local machine. I have no idea what to do.
Is this a bug? How can I fix it?