Skip to content

Commit a787ebe

Browse files
authored
Handle broken pipe error (#572)
1 parent 3f863ee commit a787ebe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

koboldcpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ async def handle_request(self, genparams, api_format, stream_flag):
626626
await asyncio.gather(*tasks)
627627
generate_result = generate_task.result()
628628
return generate_result
629-
except ConnectionAbortedError as cae: # attempt to abort if connection lost
629+
except (BrokenPipeError, ConnectionAbortedError) as cae: # attempt to abort if connection lost
630630
print(cae)
631631
handle.abort_generate()
632632
time.sleep(0.1) #short delay

0 commit comments

Comments
 (0)