diff options
Diffstat (limited to 'web/service')
| -rw-r--r-- | web/service/inbound.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/service/inbound.go b/web/service/inbound.go index 73dd17e5..01d4eb57 100644 --- a/web/service/inbound.go +++ b/web/service/inbound.go @@ -168,9 +168,13 @@ func (s *InboundService) AddInbound(inbound *model.Inbound) (*model.Inbound, boo err = tx.Save(inbound).Error if err == nil { - for _, client := range clients { - s.AddClientStat(tx, inbound.Id, &client) + if len(inbound.ClientStats) == 0 { + for _, client := range clients { + s.AddClientStat(tx, inbound.Id, &client) + } } + } else { + return inbound, false, err } needRestart := false |
