adjust streaming timings

This commit is contained in:
Concedo 2023-10-08 23:12:45 +08:00
parent e967717385
commit 4e5b6293ab

View file

@ -361,7 +361,7 @@ maxhordelen = 256
modelbusy = threading.Lock() modelbusy = threading.Lock()
requestsinqueue = 0 requestsinqueue = 0
defaultport = 5001 defaultport = 5001
KcppVersion = "1.46" KcppVersion = "1.46.1"
showdebug = True showdebug = True
showsamplerwarning = True showsamplerwarning = True
showmaxctxwarning = True showmaxctxwarning = True
@ -540,8 +540,9 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
# flush buffers, sleep a bit to make sure all data sent, and then force close the connection # flush buffers, sleep a bit to make sure all data sent, and then force close the connection
self.wfile.flush() self.wfile.flush()
await asyncio.sleep(0.1) await asyncio.sleep(0.2)
self.close_connection = True self.close_connection = True
await asyncio.sleep(0.1)
async def handle_request(self, genparams, api_format, stream_flag): async def handle_request(self, genparams, api_format, stream_flag):