Skip to content

Commit

Permalink
Fix user agents length check
Browse files Browse the repository at this point in the history
A bug that was preventing a user agent to be used if the length was 1
is now fixed.

Signed-off-by: Elis Lulja <[email protected]>
  • Loading branch information
asimpleidea committed Dec 21, 2020
1 parent b0051e2 commit 8009d26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (p *poll) do(ctx context.Context, pi *pollInfo) {

// Get the user agent
if len(pi.UserAgents) > 0 {
if len(pi.UserAgents) == 0 {
if len(pi.UserAgents) == 1 {
ua = pi.UserAgents[0]
}
uas = pi.UserAgents
Expand Down

0 comments on commit 8009d26

Please sign in to comment.