Skip to content

Commit

Permalink
fix(protoretry): ignore tls record headers and downgrade to http
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Aug 27, 2024
1 parent c117b06 commit fd8cb6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/protoretry/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package protoretry

import (
"context"
"crypto/tls"
"errors"
"io"
"net/http"
Expand All @@ -20,7 +21,7 @@ func New(base *http.Client) *Client {
func (c *Client) Do(req *http.Request) (*http.Response, error) {
if res, err := c.base.Do(req); err == nil {
return res, nil
} else if !errors.Is(err, syscall.ECONNREFUSED) {
} else if !errors.Is(err, syscall.ECONNREFUSED) && !errors.Is(err, tls.RecordHeaderError{}) {
return nil, err
}

Expand Down

0 comments on commit fd8cb6e

Please sign in to comment.