mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(gateway): add reconnect timestamp to shard state
This commit is contained in:
parent
2fc5f2a9d9
commit
1378379e14
4 changed files with 18 additions and 6 deletions
|
|
@ -109,8 +109,13 @@ async fn main() -> anyhow::Result<()> {
|
|||
};
|
||||
}
|
||||
ShardStateEvent::Closed => {
|
||||
if let Err(error) = shard_state.socket_closed(shard_id.number()).await {
|
||||
error!("failed to update shard state for heartbeat: {error}")
|
||||
if let Err(error) = shard_state.socket_closed(shard_id.number(), false).await {
|
||||
error!("failed to update shard state for closed: {error}")
|
||||
};
|
||||
}
|
||||
ShardStateEvent::Reconnect => {
|
||||
if let Err(error) = shard_state.socket_closed(shard_id.number(), true).await {
|
||||
error!("failed to update shard state for reconnect: {error}")
|
||||
};
|
||||
}
|
||||
ShardStateEvent::Other => {
|
||||
|
|
@ -121,7 +126,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
)
|
||||
.await
|
||||
{
|
||||
error!("failed to update shard state for heartbeat: {error}")
|
||||
error!("failed to update shard state for other evt: {error}")
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue