mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Fix corked AUTH subscriptions
This commit is contained in:
parent
95113c43c0
commit
168482bf86
@ -165,6 +165,7 @@ impl Minion {
|
||||
// Auth failed.
|
||||
tracing::warn!("AUTH failed to {}: {}", &self.url, ok_message);
|
||||
} else {
|
||||
tracing::info!("Authenticated to {}", &self.url);
|
||||
self.auth_state = AuthState::Authenticated;
|
||||
self.try_subscribe_waiting().await?;
|
||||
}
|
||||
|
@ -1077,7 +1077,7 @@ impl Minion {
|
||||
}
|
||||
|
||||
// If we are authenticated
|
||||
if self.auth_state != AuthState::Authenticated {
|
||||
if self.auth_state == AuthState::Authenticated {
|
||||
// Apply subscriptions that were waiting for auth
|
||||
let mut handles = std::mem::take(&mut self.subscriptions_waiting_for_auth);
|
||||
let now = Unixtime::now().unwrap();
|
||||
@ -1327,7 +1327,6 @@ impl Minion {
|
||||
self.last_message_sent = wire.clone();
|
||||
let ws_stream = self.stream.as_mut().unwrap();
|
||||
ws_stream.send(WsMessage::Text(wire)).await?;
|
||||
tracing::info!("Authenticated to {}", &self.url);
|
||||
|
||||
self.auth_state = AuthState::Waiting(id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user