diff --git a/koboldcpp.py b/koboldcpp.py index 280b88372..7f977b396 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -626,7 +626,7 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler): await asyncio.gather(*tasks) generate_result = generate_task.result() return generate_result - except ConnectionAbortedError as cae: # attempt to abort if connection lost + except (BrokenPipeError, ConnectionAbortedError) as cae: # attempt to abort if connection lost print(cae) handle.abort_generate() time.sleep(0.1) #short delay