Fix circular reference in SSLConnection

This commit is contained in:
Junhyun Shim 2022-10-27 00:29:02 +02:00
parent 2bf9c2f448
commit 4600184a4d
1 changed files with 4 additions and 4 deletions

View File

@ -881,8 +881,8 @@ public:
try {
Future<Void> onHandshook;
ConfigureSSLStream(N2::g_net2->activeTlsPolicy, self->ssl_sock, [self = self](bool verifyOk) {
self->has_trusted_peer = verifyOk;
ConfigureSSLStream(N2::g_net2->activeTlsPolicy, self->ssl_sock, [conn = self.getPtr()](bool verifyOk) {
conn->has_trusted_peer = verifyOk;
});
// If the background handshakers are not all busy, use one
@ -959,8 +959,8 @@ public:
try {
Future<Void> onHandshook;
ConfigureSSLStream(N2::g_net2->activeTlsPolicy, self->ssl_sock, [self = self](bool verifyOk) {
self->has_trusted_peer = verifyOk;
ConfigureSSLStream(N2::g_net2->activeTlsPolicy, self->ssl_sock, [conn = self.getPtr()](bool verifyOk) {
conn->has_trusted_peer = verifyOk;
});
// If the background handshakers are not all busy, use one