Skip to content

Commit

Permalink
log before every heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
henrod committed Oct 23, 2019
1 parent e6fe458 commit 7ff9098
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions agent/agent.go
Expand Up @@ -307,6 +307,7 @@ func (a *Agent) heartbeat() {
logger.Log.Debugf("Session heartbeat timeout, LastTime=%d, Deadline=%d, ID=%d", atomic.LoadInt64(&a.lastAt), deadline, a.Session.ID())
return
}
logger.Log.Debugf("Sending heartbeat to user, ID=%d", a.Session.ID())
if _, err := a.conn.Write(hbd); err != nil {
logger.Log.Errorf("Failed to send heartbeat, ID=%d", a.Session.ID())
return
Expand Down

0 comments on commit 7ff9098

Please sign in to comment.