mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Avoid abort when the response is finished
This commit is contained in:
@@ -1277,7 +1277,9 @@ const IncomingMessagePrototype = {
|
||||
if (nodeHTTPResponse) {
|
||||
this[kHandle] = undefined;
|
||||
nodeHTTPResponse.onabort = nodeHTTPResponse.ondata = undefined;
|
||||
nodeHTTPResponse.abort();
|
||||
if (!nodeHTTPResponse.finished) {
|
||||
nodeHTTPResponse.abort();
|
||||
}
|
||||
const socket = this.socket;
|
||||
if (socket && !socket.destroyed && this.aborted) {
|
||||
socket.destroy(err);
|
||||
|
||||
Reference in New Issue
Block a user