Skip to content

Commit

Permalink
Update GetStatsOnlineIpListResponse to use int64 for IP timestamps.
Browse files Browse the repository at this point in the history
  • Loading branch information
mr1cloud committed Feb 7, 2025
1 parent 3234dcb commit 5091eec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/stats/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func (s *statsServer) GetStatsOnlineIpList(ctx context.Context, request *GetStat
return nil, errors.New(request.Name, " not found.")
}

ips := make(map[string]uint64)
ips := make(map[string]int64)
for ip, t := range c.IpTimeMap() {
ips[ip] = uint64(t.Unix())
ips[ip] = t.Unix()
}

return &GetStatsOnlineIpListResponse{
Expand Down
8 changes: 4 additions & 4 deletions app/stats/command/command.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/stats/command/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ message SysStatsResponse {

message GetStatsOnlineIpListResponse {
string name = 1;
map<string, uint64> ips = 2;
map<string, int64> ips = 2;
}

service StatsService {
Expand Down

0 comments on commit 5091eec

Please sign in to comment.