This commit is contained in:
lolka1333 2026-05-05 14:09:16 +02:00
parent 179e17e267
commit 031a2f6668

View file

@ -1317,7 +1317,7 @@ func (s *InboundService) UpdateInboundClient(data *model.Inbound, clientId strin
return needRestart, tx.Save(oldInbound).Error
}
func (s *InboundService) AddTraffic(inboundTraffics []*xray.Traffic, clientTraffics []*xray.ClientTraffic) (bool, bool, error) {
func (s *InboundService) AddTraffic(inboundTraffics []*xray.Traffic, clientTraffics []*xray.ClientTraffic) (error, bool, bool) {
var err error
db := database.GetDB()
tx := db.Begin()
@ -1331,11 +1331,11 @@ func (s *InboundService) AddTraffic(inboundTraffics []*xray.Traffic, clientTraff
}()
err = s.addInboundTraffic(tx, inboundTraffics)
if err != nil {
return false, false, err
return err, false, false
}
err = s.addClientTraffic(tx, clientTraffics)
if err != nil {
return false, false, err
return err, false, false
}
needRestart0, count, err := s.autoRenewClients(tx)