Skip to content

Commit d8e2c24

Browse files
authored
fix(fetch) fix lifecycle of SSL Proxy, fix lifecycle of tls_props, fix handling chunked encoded redirects when proxing. (#13752)
1 parent 6010c33 commit d8e2c24

File tree

3 files changed

+339
-184
lines changed

3 files changed

+339
-184
lines changed

src/bun.js/api/bun/ssl_wrapper.zig

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,16 @@ pub fn SSLWrapper(comptime T: type) type {
154154

155155
// we sent the shutdown
156156
this.flags.sent_ssl_shutdown = ret >= 0;
157-
defer if (ret < 0) {
157+
if (ret < 0) {
158158
const err = BoringSSL.SSL_get_error(ssl, ret);
159159
BoringSSL.ERR_clear_error();
160160

161161
if (err == BoringSSL.SSL_ERROR_SSL or err == BoringSSL.SSL_ERROR_SYSCALL) {
162162
this.flags.fatal_error = true;
163163
this.triggerCloseCallback();
164+
return false;
164165
}
165-
};
166+
}
166167
return ret == 1; // truly closed
167168
}
168169

@@ -424,7 +425,6 @@ pub fn SSLWrapper(comptime T: type) type {
424425
if (read > 0) {
425426
this.triggerDataCallback(buffer[0..read]);
426427
}
427-
428428
this.triggerCloseCallback();
429429
return false;
430430
} else {

0 commit comments

Comments
 (0)