ci: bump tungstenite and tokio-tungstenite to 0.20.0 (#32996)
* ci: bump tungstenite and tokio-tungstenite to 0.20.0 * replace deprecated functions, read_message => read * replace deprecated functions, write_message => send
This commit is contained in:
parent
2642b8a552
commit
8940dd01fe
|
@ -4532,7 +4532,7 @@ checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb"
|
|||
dependencies = [
|
||||
"log",
|
||||
"ring",
|
||||
"rustls-webpki",
|
||||
"rustls-webpki 0.101.4",
|
||||
"sct",
|
||||
]
|
||||
|
||||
|
@ -4566,6 +4566,16 @@ dependencies = [
|
|||
"base64 0.13.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.100.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.101.4"
|
||||
|
@ -4865,6 +4875,17 @@ dependencies = [
|
|||
"digest 0.10.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"cpufeatures",
|
||||
"digest 0.10.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.9.9"
|
||||
|
@ -8081,18 +8102,17 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tokio-tungstenite"
|
||||
version = "0.17.2"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181"
|
||||
checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
"rustls 0.20.8",
|
||||
"rustls 0.21.6",
|
||||
"tokio",
|
||||
"tokio-rustls 0.23.3",
|
||||
"tokio-rustls 0.24.1",
|
||||
"tungstenite",
|
||||
"webpki",
|
||||
"webpki-roots 0.22.1",
|
||||
"webpki-roots 0.23.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -8280,24 +8300,23 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
|
|||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.17.3"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0"
|
||||
checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"byteorder",
|
||||
"bytes",
|
||||
"data-encoding",
|
||||
"http",
|
||||
"httparse",
|
||||
"log",
|
||||
"rand 0.8.5",
|
||||
"rustls 0.20.8",
|
||||
"sha-1 0.10.0",
|
||||
"rustls 0.21.6",
|
||||
"sha1",
|
||||
"thiserror",
|
||||
"url 2.4.0",
|
||||
"utf-8",
|
||||
"webpki",
|
||||
"webpki-roots 0.22.1",
|
||||
"webpki-roots 0.24.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -8589,11 +8608,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.22.1"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c475786c6f47219345717a043a37ec04cb4bc185e28853adcc4fa0a947eba630"
|
||||
checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338"
|
||||
dependencies = [
|
||||
"webpki",
|
||||
"rustls-webpki 0.100.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888"
|
||||
dependencies = [
|
||||
"rustls-webpki 0.101.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -391,12 +391,12 @@ tiny-bip39 = "0.8.2"
|
|||
tokio = "1.29.1"
|
||||
tokio-serde = "0.8"
|
||||
tokio-stream = "0.1.14"
|
||||
tokio-tungstenite = "0.17.2"
|
||||
tokio-tungstenite = "0.20.0"
|
||||
tokio-util = "0.6"
|
||||
tonic = "0.9.2"
|
||||
tonic-build = "0.9.2"
|
||||
trees = "0.4.2"
|
||||
tungstenite = "0.17.2"
|
||||
tungstenite = "0.20.0"
|
||||
unix_socket2 = "0.5.4"
|
||||
uriparse = "0.6.4"
|
||||
url = "2.4.0"
|
||||
|
|
|
@ -3985,7 +3985,7 @@ checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb"
|
|||
dependencies = [
|
||||
"log",
|
||||
"ring",
|
||||
"rustls-webpki",
|
||||
"rustls-webpki 0.101.4",
|
||||
"sct",
|
||||
]
|
||||
|
||||
|
@ -4019,6 +4019,16 @@ dependencies = [
|
|||
"base64 0.13.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.100.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.101.4"
|
||||
|
@ -4248,6 +4258,17 @@ dependencies = [
|
|||
"digest 0.10.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"cpufeatures",
|
||||
"digest 0.10.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.9.9"
|
||||
|
@ -6937,18 +6958,17 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tokio-tungstenite"
|
||||
version = "0.17.2"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181"
|
||||
checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
"rustls 0.20.8",
|
||||
"rustls 0.21.6",
|
||||
"tokio",
|
||||
"tokio-rustls 0.23.2",
|
||||
"tokio-rustls 0.24.1",
|
||||
"tungstenite",
|
||||
"webpki",
|
||||
"webpki-roots 0.22.1",
|
||||
"webpki-roots 0.23.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -7137,24 +7157,23 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
|
|||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.17.3"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0"
|
||||
checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649"
|
||||
dependencies = [
|
||||
"base64 0.13.1",
|
||||
"byteorder 1.4.3",
|
||||
"bytes",
|
||||
"data-encoding",
|
||||
"http",
|
||||
"httparse",
|
||||
"log",
|
||||
"rand 0.8.5",
|
||||
"rustls 0.20.8",
|
||||
"sha-1 0.10.0",
|
||||
"rustls 0.21.6",
|
||||
"sha1",
|
||||
"thiserror",
|
||||
"url 2.4.0",
|
||||
"utf-8",
|
||||
"webpki",
|
||||
"webpki-roots 0.22.1",
|
||||
"webpki-roots 0.24.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -7431,11 +7450,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.22.1"
|
||||
version = "0.23.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c475786c6f47219345717a043a37ec04cb4bc185e28853adcc4fa0a947eba630"
|
||||
checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338"
|
||||
dependencies = [
|
||||
"webpki",
|
||||
"rustls-webpki 0.100.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888"
|
||||
dependencies = [
|
||||
"rustls-webpki 0.101.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -164,11 +164,8 @@ where
|
|||
writable_socket: &Arc<RwLock<WebSocket<MaybeTlsStream<TcpStream>>>>,
|
||||
body: String,
|
||||
) -> Result<u64, PubsubClientError> {
|
||||
writable_socket
|
||||
.write()
|
||||
.unwrap()
|
||||
.write_message(Message::Text(body))?;
|
||||
let message = writable_socket.write().unwrap().read_message()?;
|
||||
writable_socket.write().unwrap().send(Message::Text(body))?;
|
||||
let message = writable_socket.write().unwrap().read()?;
|
||||
Self::extract_subscription_id(message)
|
||||
}
|
||||
|
||||
|
@ -201,7 +198,7 @@ where
|
|||
self.socket
|
||||
.write()
|
||||
.unwrap()
|
||||
.write_message(Message::Text(
|
||||
.send(Message::Text(
|
||||
json!({
|
||||
"jsonrpc":"2.0","id":1,"method":method,"params":[self.subscription_id]
|
||||
})
|
||||
|
@ -213,16 +210,13 @@ where
|
|||
fn get_version(
|
||||
writable_socket: &Arc<RwLock<WebSocket<MaybeTlsStream<TcpStream>>>>,
|
||||
) -> Result<semver::Version, PubsubClientError> {
|
||||
writable_socket
|
||||
.write()
|
||||
.unwrap()
|
||||
.write_message(Message::Text(
|
||||
json!({
|
||||
"jsonrpc":"2.0","id":1,"method":"getVersion",
|
||||
})
|
||||
.to_string(),
|
||||
))?;
|
||||
let message = writable_socket.write().unwrap().read_message()?;
|
||||
writable_socket.write().unwrap().send(Message::Text(
|
||||
json!({
|
||||
"jsonrpc":"2.0","id":1,"method":"getVersion",
|
||||
})
|
||||
.to_string(),
|
||||
))?;
|
||||
let message = writable_socket.write().unwrap().read()?;
|
||||
let message_text = &message.into_text()?;
|
||||
|
||||
if let Ok(json_msg) = serde_json::from_str::<Map<String, Value>>(message_text) {
|
||||
|
@ -245,7 +239,7 @@ where
|
|||
fn read_message(
|
||||
writable_socket: &Arc<RwLock<WebSocket<MaybeTlsStream<TcpStream>>>>,
|
||||
) -> Result<Option<T>, PubsubClientError> {
|
||||
let message = writable_socket.write().unwrap().read_message()?;
|
||||
let message = writable_socket.write().unwrap().read()?;
|
||||
if message.is_ping() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue