Fix rustls panic in example bots

This commit is contained in:
Joscha 2024-12-04 18:52:29 +01:00
parent 61f5559370
commit 7360bf96f8
5 changed files with 21 additions and 6 deletions

View file

@ -1,6 +1,5 @@
//! Similar to the `testbot_manual` example, but using [`Instance`] to connect
//! to the room (and to reconnect).
#![allow(unused_crate_dependencies)]
use euphoxide::api::packet::ParsedPacket;
use euphoxide::api::{Data, Nick, Send};
@ -124,6 +123,11 @@ async fn on_packet(packet: ParsedPacket, snapshot: ConnSnapshot) -> Result<(), (
#[tokio::main]
async fn main() {
// https://github.com/snapview/tokio-tungstenite/issues/353#issuecomment-2455247837
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.unwrap();
let (tx, mut rx) = mpsc::unbounded_channel();
let mut instances = Instances::new(ServerConfig::default());