@@ -2387,7 +2387,7 @@ share_result(json_t *val, json_t *res, json_t *err, const struct work *work,
struct pool *pool = work->pool;
struct cgpu_info *cgpu = thr_info[work->thr_id].cgpu;
- if (json_is_null(res) || json_is_true(res)) {
+ if ((json_is_null(err) || !err) && (json_is_null(res) || json_is_true(res))) {
cgpu->accepted++;
total_accepted++;
pool->accepted++;