TeamSmil3y / PigeonPost

Python web framework • apparently easy to use
https://docs.pigeon.teamsmiley.org
MIT License
1 stars 0 forks source link

:bug: server crashes when client closes connection before server #18

Closed lstuma closed 1 year ago

lstuma commented 1 year ago

INFO [HANDLER] REQUEST: /media/img/pigeonpost.png VERBOSE [HANDLER] SENDING RESPONSE TO 127.0.0.1:44564 VERBOSE [SERVER] CONNECTION FROM 127.0.0.1:44570 VERBOSE [HANDLER] TREATING CONNECTION FROM 127.0.0.1:44570 as HTTP request DEBUG [HANDLER] RAW PACKET: b'GET /static/css/counter.css HTTP/1.1\r\nHost: localhost\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0\r\nAccept: text/css,/;q=0.1\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: keep-alive\r\nReferer: http://localhost/\r\nSec-Fetch-Dest: style\r\nSec-Fetch-Mode: no-cors\r\nSec-Fetch-Site: same-origin\r\n\r\n' INFO [HANDLER] REQUEST: /static/css/counter.css VERBOSE [HANDLER] SENDING RESPONSE TO 127.0.0.1:44570 Traceback (most recent call last): File "/home/lstuma/programming/projects/PigeonPost/demo/app.py", line 12, in run() File "/home/lstuma/programming/projects/PigeonPost/demo/app.py", line 6, in run server.start( File "/usr/lib/python3.11/site-packages/pigeon/core/server.py", line 32, in start serve() File "/usr/lib/python3.11/site-packages/pigeon/core/server.py", line 61, in serve asyncio.run(handler.handle_request(client_sock, client_address)) File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pigeon/core/handler.py", line 71, in handle_request client_sock.shutdown(socket.SHUT_RDWR) OSError: [Errno 107] Transport endpoint is not connected

lstuma commented 1 year ago

fixed long ago - forgot to close ticket