Skip to content

Commit

Permalink
remove deadline check
Browse files Browse the repository at this point in the history
  • Loading branch information
kutluhanmetin committed Sep 4, 2023
1 parent abd9d62 commit 318f5ab
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ const latestReleaseURL = "https://api.github.com/repos/hazelcast/hazelcast-comma

// LatestReleaseVersion returns the latest release version, except beta ones
func LatestReleaseVersion(ctx context.Context) (string, error) {
if _, ok := ctx.Deadline(); !ok {
var c context.CancelFunc
ctx, c = context.WithTimeout(ctx, 3*time.Second)
defer c()
}
ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
defer cancel()
req, err := http.NewRequest(http.MethodGet, latestReleaseURL, nil)
if err != nil {
return "", err
Expand Down

0 comments on commit 318f5ab

Please sign in to comment.