all: fix bug when reconnecting

This commit is contained in:
fatedier
2016-04-07 19:27:39 +08:00
parent 6a0d6035cb
commit d5913fc77b
2 changed files with 6 additions and 2 deletions

View File

@@ -158,7 +158,7 @@ func msgReader(s *server.ProxyServer, c *conn.Conn, msgSendChan chan interface{}
case consts.HeartbeatReq:
log.Debug("ProxyName [%s], get heartbeat", s.Name)
timer.Reset(time.Duration(server.HeartBeatTimeout) * time.Second)
heartbeatRes := msg.ControlRes{
heartbeatRes := &msg.ControlRes{
Type: consts.HeartbeatRes,
}
msgSendChan <- heartbeatRes