redisAsyncFree (redis);
}
- g_set_error (&rt->err, rspamd_redis_stat_quark (), ETIMEDOUT,
- "error getting reply from redis server %s: timeout",
- rspamd_upstream_name (rt->selected));
+ if (!rt->err) {
+ g_set_error (&rt->err, rspamd_redis_stat_quark (), ETIMEDOUT,
+ "error getting reply from redis server %s: timeout",
+ rspamd_upstream_name (rt->selected));
+ }
}
/* Called when we have connected to the redis server and got stats */
rspamd_upstream_name (rt->selected), c->errstr);
rspamd_upstream_fail (rt->selected);
- g_set_error (&rt->err, rspamd_redis_stat_quark (), c->err,
- "error getting reply from redis server %s: %s",
- rspamd_upstream_name (rt->selected), c->errstr);
+ if (!rt->err) {
+ g_set_error (&rt->err, rspamd_redis_stat_quark (), c->err,
+ "error getting reply from redis server %s: %s",
+ rspamd_upstream_name (rt->selected), c->errstr);
+ }
}
}
if (rt->redis) {
rspamd_upstream_fail (rt->selected);
}
- g_set_error (&rt->err, rspamd_redis_stat_quark (), c->err,
- "cannot get values: error getting reply from redis server %s: %s",
- rspamd_upstream_name (rt->selected), c->errstr);
+
+ if (!rt->err) {
+ g_set_error (&rt->err, rspamd_redis_stat_quark (), c->err,
+ "cannot get values: error getting reply from redis server %s: %s",
+ rspamd_upstream_name (rt->selected), c->errstr);
+ }
}
if (rt->has_event) {
rspamd_upstream_fail (rt->selected);
}
- g_set_error (&rt->err, rspamd_redis_stat_quark (), c->err,
- "cannot get learned: error getting reply from redis server %s: %s",
- rspamd_upstream_name (rt->selected), c->errstr);
+ if (!rt->err) {
+ g_set_error (&rt->err, rspamd_redis_stat_quark (), c->err,
+ "cannot get learned: error getting reply from redis server %s: %s",
+ rspamd_upstream_name (rt->selected), c->errstr);
+ }
}
if (rt->has_event) {