use chan to stop heartbeat goroutine
handles client sent PubAck