Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Commit

Permalink
internal/providers: fix race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksherron committed Feb 5, 2020
1 parent b097d5c commit 8127a36
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var (
resolveCount int
)

func resolveJudges() {
func resolveJudges() {

suffix := "/get?show_env"
sites := []string{
Expand All @@ -84,7 +84,7 @@ func resolveJudges() {

var limit int

if Workers < 100 {
if Workers < 100 {
limit = Workers
} else {
limit = 100
Expand Down
2 changes: 0 additions & 2 deletions internal/providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var (

// TODO: Not sure if these are very idiomatic. Maybe use test table for providers instead of separate functions but still perform each test regardless of success.


func TestUsProxyP(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()
Expand All @@ -49,7 +48,6 @@ func TestUsProxyP(t *testing.T) {
}
}


func TestKuaidailiP(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

import (
"github.com/nicksherron/proxi/cmd"
)
import "github.com/nicksherron/proxi/cmd"

func main() {
cmd.Execute()
Expand Down

0 comments on commit 8127a36

Please sign in to comment.