mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-23 17:20:33 +00:00
read ping
This commit is contained in:
@@ -332,7 +332,7 @@ FOR_LOOP:
|
||||
c.Logger.Debug("Send Ping")
|
||||
wire.WriteByte(packetTypePing, c.bufWriter, &n, &err)
|
||||
c.sendMonitor.Update(int(n))
|
||||
go c.flush()
|
||||
c.flush()
|
||||
c.Logger.Debug("Starting pong timer")
|
||||
c.pongTimer.Reset(c.config.pongTimeout)
|
||||
case <-c.pongTimer.C:
|
||||
|
||||
@@ -137,6 +137,11 @@ func TestPongTimeoutResultsInError(t *testing.T) {
|
||||
require.Nil(t, err)
|
||||
defer mconn.Stop()
|
||||
|
||||
go func() {
|
||||
// read ping
|
||||
server.Read(make([]byte, 1))
|
||||
}()
|
||||
|
||||
expectErrorAfter := 10*time.Millisecond + mconn.config.pingInterval + mconn.config.pongTimeout
|
||||
select {
|
||||
case msgBytes := <-receivedCh:
|
||||
|
||||
Reference in New Issue
Block a user