嗯?
This commit is contained in:
parent
1cf098ccd8
commit
2c049bd1a5
@ -29,7 +29,6 @@ pub struct Cluster {
|
|||||||
|
|
||||||
impl Cluster {
|
impl Cluster {
|
||||||
pub async fn new(config: Config) -> Self {
|
pub async fn new(config: Config) -> Self {
|
||||||
|
|
||||||
let disconnect = |reason: Payload, _: Client| {
|
let disconnect = |reason: Payload, _: Client| {
|
||||||
async move {
|
async move {
|
||||||
fatal!("socket disconnect: {:?}", reason);
|
fatal!("socket disconnect: {:?}", reason);
|
||||||
@ -54,7 +53,10 @@ impl Cluster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn disconnect(&self) {
|
pub async fn disconnect(&self) {
|
||||||
self.socket.disconnect().await.expect("Failed to disconnect");
|
self.socket
|
||||||
|
.disconnect()
|
||||||
|
.await
|
||||||
|
.expect("Failed to disconnect");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ```typescript
|
/// ```typescript
|
||||||
|
Loading…
Reference in New Issue
Block a user