diff options
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r-- | ext/websocket/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index c75fa1742..f9f11e591 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -224,9 +224,8 @@ where let unsafely_ignore_certificate_errors = state .borrow() - .borrow::<UnsafelyIgnoreCertificateErrors>() - .0 - .clone(); + .try_borrow::<UnsafelyIgnoreCertificateErrors>() + .and_then(|it| it.0.clone()); let root_cert_store = state.borrow().borrow::<WsRootStore>().0.clone(); let user_agent = state.borrow().borrow::<WsUserAgent>().0.clone(); let uri: Uri = args.url.parse()?; |