Closed button-chen closed 1 month ago
Code: ctx, _:= context.WithTimeout(context.Background(), *2time.Second) response, err := conn.SendCommand(ctx**, ...)
// do something, after 2 seconds
response, err := conn.SendCommand(context.Background(), ...) At this point, err is io write timeout
The cause of this problem is that the SetWriteDeadline is not set back
@mkravos hi bro, can you take a look at this pr?
Nice! Merged.
Code: ctx, _:= context.WithTimeout(context.Background(), *2time.Second) response, err := conn.SendCommand(ctx**, ...)
// do something, after 2 seconds
response, err := conn.SendCommand(context.Background(), ...)
At this point, err is io write timeout
The cause of this problem is that the SetWriteDeadline is not set back