Fix a few typos
parent
e27044b4c4
commit
471e6a2c80
|
@ -168,7 +168,7 @@ func (self *ClusterServer) heartbeat() {
|
|||
}
|
||||
|
||||
if !self.isUp {
|
||||
log.Warn("Server marked as up. Hearbeat succeeded")
|
||||
log.Warn("Server marked as up. Heartbeat succeeded")
|
||||
}
|
||||
// otherwise, reset the backoff and mark the server as up
|
||||
self.isUp = true
|
||||
|
@ -202,7 +202,7 @@ func (self *ClusterServer) markServerAsDown() {
|
|||
|
||||
func (self *ClusterServer) handleHeartbeatError(err error) {
|
||||
if self.isUp {
|
||||
log.Warn("Server marked as down. Hearbeat error for server: %d - %s: %s", self.Id, self.ProtobufConnectionString, err)
|
||||
log.Warn("Server marked as down. Heartbeat error for server: %d - %s: %s", self.Id, self.ProtobufConnectionString, err)
|
||||
}
|
||||
self.markServerAsDown()
|
||||
self.Backoff *= 2
|
||||
|
|
|
@ -76,7 +76,7 @@ func (prs *PingResponseServer) handleConnection(conn net.Conn) {
|
|||
conn.Close()
|
||||
}
|
||||
|
||||
func FakeHearbeatServer() *PingResponseServer {
|
||||
func FakeHeartbeatServer() *PingResponseServer {
|
||||
l, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -88,7 +88,7 @@ func FakeHearbeatServer() *PingResponseServer {
|
|||
|
||||
func BenchmarkSingle(b *testing.B) {
|
||||
var HEARTBEAT_TYPE = protocol.Request_HEARTBEAT
|
||||
prs := FakeHearbeatServer()
|
||||
prs := FakeHeartbeatServer()
|
||||
client := NewProtobufClient(prs.Listener.Addr().String(), time.Second)
|
||||
client.Connect()
|
||||
b.ResetTimer()
|
||||
|
|
Loading…
Reference in New Issue