Fix Response.send_chunk() and helpers.sendfile() (#150)

pull/157/head
Mike Piecuch 2023-12-26 12:23:08 -05:00 zatwierdzone przez GitHub
rodzic e6710b6a9e
commit 26709f4086
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -1623,13 +1623,14 @@ class AppResponse:
) # if aborted set to done True and ok False
return self._chunkFuture
self._lastChunkOffset = self.get_write_offset()
(ok, done) = self.try_end(buffer, total_size)
if ok:
self._chunkFuture.set_result((ok, done))
return self._chunkFuture
# failed to send chunk
self._lastChunkOffset = self.get_write_offset()
# failed to send chunk
return self._chunkFuture
def get_data(self):