diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-09 20:55:46 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-09 20:55:46 +0400 |
commit | 0d211727eeee45ce068e23dfdb6b4da96ba59340 (patch) | |
tree | 53e45a26f0330ad099ce63d85ba150e952c42026 /src/protocol.c | |
parent | 54792e26fbc26ef0a724c2b301dd74a788e3f6dd (diff) | |
download | rspamd-0d211727eeee45ce068e23dfdb6b4da96ba59340.tar.gz rspamd-0d211727eeee45ce068e23dfdb6b4da96ba59340.zip |
* Very hard to detect problem with race among error in socket and destroying task while we are writing to socket and go through a hash table
Diffstat (limited to 'src/protocol.c')
-rw-r--r-- | src/protocol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/protocol.c b/src/protocol.c index 76627e15e..999de65ab 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -688,11 +688,13 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data else { if (! rspamd_dispatcher_write (task->dispatcher, outbuf, r, FALSE, FALSE)) { cd->alive = FALSE; + return; } if (task->cmd == CMD_SYMBOLS && metric_value != NULL) { if (! show_metric_symbols (metric_res, cd)) { cd->alive = FALSE; + return; } } } |