Skip to content

Commit

Permalink
Increase heartbeat server time precision
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro committed Mar 25, 2017
1 parent 10bb86d commit 19156e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
### Changed
- Improve user email storage and comparison.
- Allow group batch fetch by both ID and name.
- Increase heartbeat server time precision.

### Fixed
- Fix Facebook unlink operation.
Expand Down
2 changes: 1 addition & 1 deletion server/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (s *session) pingNow() bool {
}

// Server heartbeat.
err = s.Send(&Envelope{Payload: &Envelope_Heartbeat{&Heartbeat{Timestamp: time.Now().UTC().Unix()}}})
err = s.Send(&Envelope{Payload: &Envelope_Heartbeat{&Heartbeat{Timestamp: nowMs()}}})
if err != nil {
s.logger.Warn("Could not send heartbeat", zap.String("remoteAddress", s.conn.RemoteAddr().String()), zap.Error(err))
}
Expand Down

0 comments on commit 19156e4

Please sign in to comment.