Skip to content

Commit ee11e05

Browse files
committed
fixes HTTP2 client destory error handling
1 parent 1da832d commit ee11e05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main_process/main_httpController.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ const httpController = {
116116
client.on("error", (err) => {
117117
console.log("HTTP2 FAILED...trying HTTP1\n", err);
118118
http2Connection.status = "failed";
119-
client.destroy();
119+
try {
120+
client.destroy();
121+
} catch (error) {
122+
console.log('error destroying HTTP2 client', error);
123+
}
120124
delete httpController.openHTTP2Connections[host];
121125

122126
// try again with fetch (HTTP1);

0 commit comments

Comments
 (0)