Skip to content

Commit

Permalink
Merge pull request #37
Browse files Browse the repository at this point in the history
Release v0.1.5
  • Loading branch information
bsrinivas8687 authored Jun 26, 2021
2 parents 0b9132a + 2130af3 commit f3498dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ func (n *Node) jobUpdateSessions() error {

remove, skip := func() (bool, bool) {
switch {
case items[i].Download == session.Bandwidth.Upload.Int64() && items[i].ConnectedAt.Before(session.StatusAt):
n.Log().Info("Stale peer connection", "id", items[i].ID)
return true, true
case !subscription.Status.Equal(hubtypes.StatusActive):
n.Log().Info("Invalid subscription status", "id", items[i].ID)
return true, subscription.Status.Equal(hubtypes.StatusInactive)
case !session.Status.Equal(hubtypes.StatusActive):
n.Log().Info("Invalid session status", "id", items[i].ID)
return true, session.Status.Equal(hubtypes.StatusInactive)
case items[i].Download == session.Bandwidth.Upload.Int64() && items[i].ConnectedAt.Before(session.StatusAt):
n.Log().Info("Stale peer connection", "id", items[i].ID)
return true, false
default:
return false, false
}
Expand Down

0 comments on commit f3498dc

Please sign in to comment.