fixed local expiration check

This commit is contained in:
Jędrzej Stuczyński
2024-02-19 17:55:36 +00:00
parent 04373589b1
commit 3ec2ea904f
4 changed files with 4 additions and 4 deletions
@@ -76,7 +76,7 @@ pub(crate) async fn execute(args: Args) -> Result<(), ClientError> {
}
BandwidthCredentialIssuedDataVariant::FreePass(freepass_info) => {
info!("with expiry at {}", freepass_info.expiry_date());
if freepass_info.expiry_date() > OffsetDateTime::now_utc() {
if freepass_info.expired() {
error!("the free pass has already expired!");
// technically we can import it, but the gateway will just reject it so what's the point
@@ -76,7 +76,7 @@ pub(crate) async fn execute(args: Args) -> Result<(), Socks5ClientError> {
}
BandwidthCredentialIssuedDataVariant::FreePass(freepass_info) => {
info!("with expiry at {}", freepass_info.expiry_date());
if freepass_info.expiry_date() > OffsetDateTime::now_utc() {
if freepass_info.expired() {
error!("the free pass has already expired!");
// technically we can import it, but the gateway will just reject it so what's the point
@@ -80,7 +80,7 @@ pub async fn execute(args: Args) -> anyhow::Result<()> {
}
BandwidthCredentialIssuedDataVariant::FreePass(freepass_info) => {
info!("with expiry at {}", freepass_info.expiry_date());
if freepass_info.expiry_date() > OffsetDateTime::now_utc() {
if freepass_info.expired() {
error!("the free pass has already expired!");
// technically we can, but the gateway will just reject it so what's the point
@@ -76,7 +76,7 @@ pub(crate) async fn execute(args: Args) -> Result<(), NetworkRequesterError> {
}
BandwidthCredentialIssuedDataVariant::FreePass(freepass_info) => {
info!("with expiry at {}", freepass_info.expiry_date());
if freepass_info.expiry_date() > OffsetDateTime::now_utc() {
if freepass_info.expired() {
error!("the free pass has already expired!");
// technically we can import it, but the gateway will just reject it so what's the point