Skip to content

Commit

Permalink
fix: ignore conn read timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
twz915 authored Dec 5, 2023
1 parent 3f9c59f commit 0df724d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/remote/remote_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ import (
"bytes"
"context"
"encoding/binary"
"errors"
"io"
"net"
"os"
"sync"
"time"

Expand Down Expand Up @@ -174,6 +176,10 @@ func (c *remotingClient) receiveResponse(r *tcpConnWrapper) {
header := primitive.GetHeader()
defer primitive.BackHeader(header)
for {
// ignore context timeout, read no data
if errors.Is(err, os.ErrDeadlineExceeded) {
err = nil
}
if err != nil {
// conn has been closed actively
if r.isClosed(err) {
Expand Down

0 comments on commit 0df724d

Please sign in to comment.