这是该
SocketServer模块的Python 2实现的问题,在Python 3(服务器继续提供服务)中不存在。
您有3个选择:
- 不要将内置服务器用于生产系统(毕竟它是 开发 服务器)。使用适当的WSGI服务器,例如gunicorn或uWSGI,
- 使用
app.run(threaded=True)
;启用线程模式 线程死亡,但为将来的请求创建了一个新线程, - 升级到Python 3。

这是该
SocketServer模块的Python 2实现的问题,在Python 3(服务器继续提供服务)中不存在。
您有3个选择:
app.run(threaded=True);启用线程模式 线程死亡,但为将来的请求创建了一个新线程,