Revert "Attempt to fix some empty lines from spamd"

This reverts commit 0a272d09db.
This commit is contained in:
Dolf Schimmel (Freeaqingme)
2015-09-19 21:26:01 +02:00
parent 0a272d09db
commit d608b5651b

View File

@@ -316,9 +316,7 @@ func processResponse(cmd string, data *bufio.Reader) (returnObj *SpamDOut, err e
r := regexp.MustCompile(`(?i)SPAMD\/([0-9\.]+)\s([0-9]+)\s([0-9A-Z_]+)`) r := regexp.MustCompile(`(?i)SPAMD\/([0-9\.]+)\s([0-9]+)\s([0-9A-Z_]+)`)
var result = r.FindStringSubmatch(lineStr) var result = r.FindStringSubmatch(lineStr)
if len(result) < 4 { if len(result) < 4 {
// We're not actually sure what a line of zero length represents. However, if cmd != "SKIP" {
// we're now testing if it helps to ignore these zero-length lines.
if cmd != "SKIP" && len(result) > 0 {
err = errors.New("spamd unrecognized reply:" + lineStr) err = errors.New("spamd unrecognized reply:" + lineStr)
} else { } else {
returnObj.Code = EX_OK returnObj.Code = EX_OK