aio-libs / aio-libs/aiosmtpd

Controller throws a TimeoutError when binding a unspecified address

Đang mở
#272 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
373
Fork
105
Merge trung bình
4 phút
Pull request đã merge (30 ngày)
2

Mô tả

Controller throws a TimeoutError when binding a unspecified address.
Affected versions: aiosmtpd (1.2.3-1.4.2)
Example:
```python
from aiosmtpd.controller import Controller

class CustomHandler:
async def handle_DATA(self, server, session, envelope):
return '250 OK'

if __name__ == '__main__':
handler = CustomHandler()
controller = Controller(handler, hostname='0.0.0.0', port=10025)
controller.start()
input('SMTP server running. Press Return to stop server and exit.')
controller.stop()
```
Running this code will prompt an error
```python
Traceback (most recent call last):
File "C:\USER_PROGRAM\PyCharm\plugins\python-ce\helpers\pydev\pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\USER_PROGRAM\PyCharm\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/root/PycharmProjects/Projects/test.py", line 10, in
controller.start()
File "C:\Users\root\PycharmProjects\Projects\venv\lib\site-packages\aiosmtpd\controller.py", line 231, in start
raise TimeoutError(
TimeoutError: SMTP server started, but not responding within allotted time. This might happen if the system is too busy. Try increasing the `ready_timeout` parameter.
```
This is obviously a clear mistake. That needs to be fixed as soon as possible.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.