geyser: do not disconnect if subscribe stream is closed (#140)
This commit is contained in:
parent
9e0775068d
commit
092a94fccf
|
@ -4290,7 +4290,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yellowstone-grpc-geyser"
|
||||
version = "0.8.0+solana.1.15.2"
|
||||
version = "0.8.1+solana.1.15.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.0",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
members = [
|
||||
"examples/rust", # 1.2.0+solana.1.15.2
|
||||
"yellowstone-grpc-client", # 1.2.0+solana.1.15.2
|
||||
"yellowstone-grpc-geyser", # 0.8.0+solana.1.15.2
|
||||
"yellowstone-grpc-geyser", # 0.8.1+solana.1.15.2
|
||||
"yellowstone-grpc-proto", # 1.2.0+solana.1.15.2
|
||||
]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yellowstone-grpc-geyser"
|
||||
version = "0.8.0+solana.1.15.2"
|
||||
version = "0.8.1+solana.1.15.2"
|
||||
authors = ["Triton One"]
|
||||
edition = "2021"
|
||||
description = "Yellowstone gRPC Geyser Plugin"
|
||||
|
|
|
@ -609,6 +609,7 @@ impl GrpcService {
|
|||
}
|
||||
ClientMessage::Drop { id } => {
|
||||
if clients.remove(&id).is_some() {
|
||||
info!("{id}, client removed");
|
||||
CONNECTIONS_TOTAL.dec();
|
||||
}
|
||||
}
|
||||
|
@ -692,11 +693,15 @@ impl Geyser for GrpcService {
|
|||
.await;
|
||||
}
|
||||
}
|
||||
Ok(None) => break,
|
||||
Err(_error) => break,
|
||||
Ok(None) => {
|
||||
break;
|
||||
}
|
||||
Err(_error) => {
|
||||
let _ = new_clients_tx.send(ClientMessage::Drop { id });
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let _ = new_clients_tx.send(ClientMessage::Drop { id });
|
||||
});
|
||||
|
||||
Ok(Response::new(ReceiverStream::new(stream_rx)))
|
||||
|
|
Loading…
Reference in New Issue