aio-libs / aio-libs/aiohttp

ConnectionResetError when close browser, but not all static files was fetch

Đang mở
#1,893 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement sprint
Ngôn ngữ chính
Python
Star
16.5k
Fork
2.4k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
212

Mô tả

#1773 - The problem still remains in ver. 2.1.0.dev0:

```
RuntimeError: File descriptor 12 is used by transport <_SelectorSocketTransport fd=12 read=polling write=>
Exception in callback SendfilePayloadWriter._sendfile_cb(, 12, 9, 30240, 1018100, <_UnixSelecto...se debug=True>, True)
handle: , 12, 9, 30240, 1018100, <_UnixSelecto...se debug=True>, True) created at /usr/local/lib/python3.6/asyncio/selector_events.py:298>
source_traceback: Object created at (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/alfa_promo/__main__.py", line 6, in
run_app(alfa_promo.application, host='0.0.0.0', port=5897)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web.py", line 413, in run_app
loop.run_forever()
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 421, in run_forever
self._run_once()
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1417, in _run_once
handle._run()
File "/usr/local/lib/python3.6/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 432, in start
yield from resp.prepare(request)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 238, in prepare
return (yield from self._sendfile(request, fobj, count))
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 126, in _sendfile_system
yield from writer.sendfile(fobj, count)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 75, in sendfile
self._sendfile_cb(fut, out_fd, in_fd, offset, count, loop, False)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 53, in _sendfile_cb
offset + n, count - n, loop, True)
File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 347, in add_writer
return self._add_writer(fd, callback, *args)
File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 298, in _add_writer
handle = events.Handle(callback, args, self)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/root/.virtualenvs/36/root/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 37, in _sendfile_cb
loop.remove_writer(out_fd)
File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 351, in remove_writer
self._ensure_fd_no_transport(fd)
File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 258, in _ensure_fd_no_transport
fd, transport))
```

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.