Skip to content

Commit

Permalink
Update inbound.go
Browse files Browse the repository at this point in the history
fix expiry time
  • Loading branch information
vaxilu committed Jul 26, 2021
1 parent 64c5ecc commit 500b08b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/service/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (s *InboundService) AddTraffic(traffics []*xray.Traffic) (err error) {

func (s *InboundService) DisableInvalidInbounds() (int64, error) {
db := database.GetDB()
now := time.Now()
now := time.Now().Unix() * 1000
result := db.Model(model.Inbound{}).
Where("((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?", now, true).
Update("enable", false)
Expand Down

0 comments on commit 500b08b

Please sign in to comment.