Skip to content

Commit

Permalink
Increase concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
senseless committed Sep 22, 2024
1 parent 0bb1209 commit bbe7907
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ibpmonitor/checkssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"time"
)

const MaxConcurrentChecks = 10

type SslResult struct {
CheckName string `json:"checkname"`
MemberName string `json:"membername"`
Expand All @@ -31,6 +29,8 @@ type SslData struct {

func SslCheck(member Member, options config.CheckConfig, resultsCollectorChannel chan string) {

var MaxConcurrentChecks = 20

checkName := "ssl"
connectTimeout := getIntOption(options.ExtraOptions, "ConnectTimeout", 4)
uniqueHostnames := make(map[string]bool)
Expand Down
5 changes: 3 additions & 2 deletions ibpmonitor/checkwss.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ type JSONRPCRequest struct {
}

func WssCheck(member Member, options config.CheckConfig, resultsCollectorChannel chan string) {

var MaxConcurrentChecks = 20
connectTimeout := getIntOption(options.ExtraOptions, "ConnectTimeout", 4)

const maxConcurrentChecks = 10
sem := semaphore.NewWeighted(int64(maxConcurrentChecks))
sem := semaphore.NewWeighted(int64(MaxConcurrentChecks))

var wg sync.WaitGroup

Expand Down

0 comments on commit bbe7907

Please sign in to comment.