Skip to content

Commit

Permalink
delay pong
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Sep 28, 2023
1 parent 7d5f281 commit be28bd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion p2p/protocol/ping/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (p *PingService) PingHandler(s network.Stream) {
errCh <- err
return
}

time.Sleep(1 * time.Second)
_, err = s.Write(buf)
if err != nil {
log.Error("write failed: ", err)
Expand Down
1 change: 0 additions & 1 deletion p2p/transport/webrtc/stream_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func (s *stream) Read(b []byte) (int, error) {
n := copy(b, s.nextMessage.Message)
read += n
s.nextMessage.Message = s.nextMessage.Message[n:]
log.Errorln("read successful", n)
return read, nil
}

Expand Down

0 comments on commit be28bd8

Please sign in to comment.