aio-libs / aio-libs/aiosmtpd

_trigger_server in infinite loop

Open
#492 1 comment 0 reactions 0 assignees View on GitHub
need reproducer
Dominant language
Python
Stars
373
Forks
105
Avg merge
4m
Merged PRs (30d)
2

Description

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:
![image](https://github.com/user-attachments/assets/9ffc2984-5477-4f68-820d-003ad8e738a0)

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.