Skip to content

Commit

Permalink
Fix: Use correct parameter order in SpamAssassin socket detection (#364)
Browse files Browse the repository at this point in the history
Signed-off-by: cuishuang <[email protected]>
  • Loading branch information
cuishuang authored Sep 26, 2024
1 parent 7f4cd90 commit a64950d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/spamassassin/spamassassin.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func Ping() error {
}

var client *spamc.Client
if strings.HasPrefix("unix:", service) {
if strings.HasPrefix(service, "unix:") {
client = spamc.NewUnix(strings.TrimLeft(service, "unix:"))
} else {
client = spamc.NewTCP(service, timeout)
Expand Down Expand Up @@ -112,7 +112,7 @@ func Check(msg []byte) (Result, error) {
}
} else {
var client *spamc.Client
if strings.HasPrefix("unix:", service) {
if strings.HasPrefix(service, "unix:") {
client = spamc.NewUnix(strings.TrimLeft(service, "unix:"))
} else {
client = spamc.NewTCP(service, timeout)
Expand Down

0 comments on commit a64950d

Please sign in to comment.