Skip to content

Commit

Permalink
Ameerul /Bug 86546 P2P clients (Not POI verified clients) are not tem…
Browse files Browse the repository at this point in the history
…p. banned when we block temporary until 14th of next month or any further dates. (#7444)

* chore: revert

* chore: added comment
  • Loading branch information
ameerul-deriv committed Feb 7, 2023
1 parent 9db2dac commit 055373f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/p2p/src/stores/general-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,8 @@ export default class GeneralStore extends BaseStore {
const server_time = this.props.server_time.get();
const blocked_until_moment = toMoment(blocked_until);

this.user_blocked_timeout = setTimeout(() => {
this.setUserBlockedUntil(null);
}, blocked_until_moment.diff(server_time));
// Need isAfter instead of setTimeout as setTimeout has a max delay of 24.8 days
if (server_time.isAfter(blocked_until_moment)) this.setUserBlockedUntil(null);
}
}
);
Expand Down

0 comments on commit 055373f

Please sign in to comment.