Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ws-rs with async-tungstenite. #27164

Merged
merged 1 commit into from Jul 8, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

net: Replace ws-rs with async-tungstenite.

  • Loading branch information
jdm committed Jul 8, 2020
commit 76198e40a8921bfa6ef4e8e8d259ebdc3814e426

Large diffs are not rendered by default.

@@ -27,7 +27,7 @@ opt-level = 3
# <crate> = { path = "/path/to/local/checkout" }

# This is here to dedupe winapi since mio 0.6 is still using winapi 0.2.
mio = { git = "https://github.com/servo/mio.git", branch = "servo" }
mio = { git = "https://github.com/servo/mio.git", branch = "servo-mio-0.6.22" }

# https://github.com/servo/servo/issues/27039#issuecomment-654400150
[patch."https://github.com/servo/webrender"]
@@ -15,6 +15,7 @@ test = false
doctest = false

[dependencies]
async-tungstenite = { version = "0.7.1", features = ["tokio-openssl"] }
base64 = "0.10.1"
brotli = "3"
bytes = "0.4"
@@ -26,6 +27,7 @@ devtools_traits = { path = "../devtools_traits" }
embedder_traits = { path = "../embedder_traits" }
flate2 = "1"
futures = "0.1"
futures03 = { version = "0.3", package = "futures" }
headers = "0.2"
http = "0.1"
hyper = "0.12"
@@ -56,10 +58,11 @@ servo_config = { path = "../config" }
servo_url = { path = "../url" }
time = "0.1.17"
tokio = "0.1"
tokio2 = { version = "0.2", package = "tokio", features = ["sync", "macros", "rt-threaded"] }
tungstenite = "0.11"
url = "2.0"
uuid = { version = "0.8", features = ["v4"] }
webrender_api = { git = "https://github.com/servo/webrender" }
ws = { version = "0.9", features = ["ssl"] }

[dev-dependencies]
futures = "0.1"
@@ -16,7 +16,7 @@ use crate::hsts::HstsList;
use crate::http_cache::HttpCache;
use crate::http_loader::{http_redirect_fetch, HttpState, HANDLE};
use crate::storage_thread::StorageThreadFactory;
use crate::websocket_loader;
use crate::websocket_loader::{self, HANDLE as WS_HANDLE};
use crossbeam_channel::Sender;
use devtools_traits::DevtoolsControlMsg;
use embedder_traits::resources::{self, Resource};
@@ -616,6 +616,9 @@ impl CoreResourceManager {
// Shut-down the async runtime used by fetch workers.
drop(HANDLE.lock().unwrap().take());

// Shut-down the async runtime used by websocket workers.
drop(WS_HANDLE.lock().unwrap().take());

debug!("Exited CoreResourceManager");
}

@@ -727,8 +730,6 @@ impl CoreResourceManager {
action_receiver,
http_state.clone(),
self.certificate_path.clone(),
http_state.extra_certs.clone(),
http_state.connection_certs.clone(),
);
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.