Skip to content

Commit

Permalink
Merge pull request bitly#46 from ploxiln/simpleleveldb_2183
Browse files Browse the repository at this point in the history
simpleleveldb: dump_csv properly cleaned up for keep-alive connections
  • Loading branch information
mreiferson committed Apr 12, 2012
2 parents 9702bde + c8d6441 commit 9542ce8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions simpleleveldb/simpleleveldb.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "http-internal.h"

#define NAME "simpleleveldb"
#define VERSION "0.5"
#define VERSION "0.6"

#define DUMP_CSV_ITERS_CHECK 10
#define DUMP_CSV_MSECS_WORK 10
Expand Down Expand Up @@ -664,7 +664,9 @@ void do_dump_csv(int fd, short what, void *ctx)
set_dump_csv_timer(req);
} else {
evhttp_send_reply_end(req);
// cleanup_cump_csv_cb() automatically called
// we're finished this request, but connection might be reused
evhttp_connection_set_closecb(req->evcon, NULL, NULL);
cleanup_dump_csv_cb(NULL, NULL);
}
}

Expand Down

0 comments on commit 9542ce8

Please sign in to comment.