diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2022-11-27 04:50:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 04:50:14 +0100 |
commit | 0012484f4f194664bea87879ab9f4f20f4ee86c6 (patch) | |
tree | 29feb95f1f41cc68bce5b3cfedb4e04d7c186cb6 /ext/flash/socket.rs | |
parent | 95fb4b886b6f8cb0c3805cd77b6c1359e967bd60 (diff) |
Revert "fix(ext/flash): graceful server startup/shutdown with unsettl… (#16839)
…ed promises in mind (#16616)"
This reverts commit fd023cf7937e67dfde5482d34ebc60839eb7397c.
There are reports saying that Vite is often hanging in 1.28.2 and this
is
the only PR that changed something with HTTP server. I think we should
hold off on trying to fix this and instead focus on #16787
CC @magurotuna
Diffstat (limited to 'ext/flash/socket.rs')
-rw-r--r-- | ext/flash/socket.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/ext/flash/socket.rs b/ext/flash/socket.rs index 7c75b230a..8256be8a0 100644 --- a/ext/flash/socket.rs +++ b/ext/flash/socket.rs @@ -1,26 +1,23 @@ use deno_core::error::AnyError; use mio::net::TcpStream; -use std::cell::UnsafeCell; -use std::future::Future; -use std::io::Read; -use std::io::Write; -use std::marker::PhantomPinned; -use std::pin::Pin; -use std::sync::Arc; -use std::sync::Mutex; +use std::{ + cell::UnsafeCell, + future::Future, + io::{Read, Write}, + pin::Pin, + sync::{Arc, Mutex}, +}; use tokio::sync::mpsc; use crate::ParseStatus; type TlsTcpStream = rustls::StreamOwned<rustls::ServerConnection, TcpStream>; -#[derive(Debug)] pub enum InnerStream { Tcp(TcpStream), Tls(Box<TlsTcpStream>), } -#[derive(Debug)] pub struct Stream { pub inner: InnerStream, pub detached: bool, @@ -29,7 +26,6 @@ pub struct Stream { pub parse_done: ParseStatus, pub buffer: UnsafeCell<Vec<u8>>, pub read_lock: Arc<Mutex<()>>, - pub _pinned: PhantomPinned, } impl Stream { |