diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-03-17 11:34:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-28 19:55:04 +0200 |
commit | 003a7fe2a390615df9f700193ab0fe52fa4ade93 (patch) | |
tree | 0084ed6069db0665d30728cc0eeb90a313c92833 /src/or/directory.c | |
parent | 436b975e213aaf0abe12e0fe035b7b83bcb2198a (diff) | |
download | tor-003a7fe2a390615df9f700193ab0fe52fa4ade93.tar.gz tor-003a7fe2a390615df9f700193ab0fe52fa4ade93.zip |
Add nonfatal asserts for return val of dirserv_flushed_some
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index ee36a433c8..fa76afac66 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -3181,7 +3181,8 @@ handle_get_current_consensus(dir_connection_t *conn, conn->zlib_state = tor_zlib_new(0, ZLIB_METHOD, HIGH_COMPRESSION); /* Prime the connection with some data. */ - connection_dirserv_flushed_some(conn); + const int initial_flush_result = connection_dirserv_flushed_some(conn); + tor_assert_nonfatal(initial_flush_result == 0); goto done; } @@ -3337,7 +3338,8 @@ handle_get_microdesc(dir_connection_t *conn, const get_handler_args_t *args) conn->zlib_state = tor_zlib_new(1, ZLIB_METHOD, choose_compression_level(size_guess)); - connection_dirserv_flushed_some(conn); + const int initial_flush_result = connection_dirserv_flushed_some(conn); + tor_assert_nonfatal(initial_flush_result == 0); goto done; } @@ -3430,7 +3432,8 @@ handle_get_descriptor(dir_connection_t *conn, const get_handler_args_t *args) choose_compression_level(size_guess)); clear_spool = 0; /* Prime the connection with some data. */ - connection_dirserv_flushed_some(conn); + int initial_flush_result = connection_dirserv_flushed_some(conn); + tor_assert_nonfatal(initial_flush_result == 0); } goto done; } |