Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Might be a tiny bug in “p_redis.go”. #196

Closed
issuefiler opened this issue Nov 19, 2019 · 4 comments
Closed

Might be a tiny bug in “p_redis.go”. #196

issuefiler opened this issue Nov 19, 2019 · 4 comments
Labels

Comments

@issuefiler
Copy link

redisErr = redisClient.redisConnection(config.RedisInterface)

_, doErr := redisClient.conn.Do("SETEX", hash, config.RedisExpireSeconds, stringer)
if doErr != nil {
Log().WithError(doErr).Warn("Error while SETEX to redis")
result := NewResult(response.Canned.FailBackendTransaction)
return result, redisErr
}

Shouldn’t it return result, doErr?

@flashmob
Copy link
Owner

Here we don't really care about the result, because were using SETEX (saving data)

@issuefiler
Copy link
Author

redisErr = redisClient.redisConnection(config.RedisInterface)
if redisErr != nil {
Log().WithError(redisErr).Warn("Error while connecting to redis")
result := NewResult(response.Canned.FailBackendTransaction)
return result, redisErr
}
_, doErr := redisClient.conn.Do("SETEX", hash, config.RedisExpireSeconds, stringer)
if doErr != nil {
Log().WithError(doErr).Warn("Error while SETEX to redis")
result := NewResult(response.Canned.FailBackendTransaction)
return result, redisErr
}

I mean, the line number 110: return result, redisErr. Does it really mean to return redisErr that is a nil?

@flashmob flashmob added todo and removed wontfix labels Nov 28, 2019
@flashmob
Copy link
Owner

Indeed, line 110 should return doErr.

Todo: Fix

@flashmob flashmob added testing and removed todo labels Dec 13, 2019
@flashmob flashmob added lgtm and removed testing labels Dec 25, 2019
flashmob added a commit that referenced this issue Dec 27, 2019
- Parser captures quoted local-parts without the escape characters
- mail.Address.String() know when to quote local-part, 
- server's `allowsHost` function is ipv6 address aware (addresses specified in the config will get normalized to their ipv6 simplest form, addresses parsed from RCPT and MAIL commands will have ipv6 normalized)
- if `<postmaster>` is used in the RCPT TO (without a host), then new functionality was added to assume that the host is assumed to be the Hostname setting for the Server
- HELO/EHLO argument validation. #200
- The “header” processor populates “Received:” headers wrongly. #198
-  tiny bug in “p_redis.go”. #196
- “MimeHeaderDecode” (envelope.go) returns an incorrectly-spaced string. #195
- go-guerrilla cannot properly handle some valid addresses. #199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants