diff options
author | cel 🌸 <cel@blos.sm> | 2023-07-04 21:27:15 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-07-04 21:27:15 +0100 |
commit | 143a0365d0822e6786cdac3530a725bbf450f38f (patch) | |
tree | 8b540aa73c1365ddc658e502ed93847dbb522064 /src/client/unencrypted.rs | |
parent | c0a7116eef13ea75340fe7d75da97dfbd04fac20 (diff) | |
download | luz-143a0365d0822e6786cdac3530a725bbf450f38f.tar.gz luz-143a0365d0822e6786cdac3530a725bbf450f38f.tar.bz2 luz-143a0365d0822e6786cdac3530a725bbf450f38f.zip |
horrible
Diffstat (limited to 'src/client/unencrypted.rs')
-rw-r--r-- | src/client/unencrypted.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/unencrypted.rs b/src/client/unencrypted.rs index 74b800c..d4225d3 100644 --- a/src/client/unencrypted.rs +++ b/src/client/unencrypted.rs @@ -115,14 +115,12 @@ impl<'j> JabberClient<'j> { .connect(&self.jabber.server, stream) .await { - let (read, write) = tokio::io::split(tlsstream); + let (read, writer) = tokio::io::split(tlsstream); let reader = Reader::from_reader(BufReader::new(read)); - let writer = Writer::new(write); - return Ok(super::encrypted::JabberClient::new( - reader, - writer, - self.jabber, - )); + let mut client = + super::encrypted::JabberClient::new(reader, writer, self.jabber); + client.start_stream().await?; + return Ok(client); } } QName(_) => return Err(JabberError::TlsNegotiation), |