From f6dd3a076c0da10eae654d1e9f42c9e7cea9d733 Mon Sep 17 00:00:00 2001 From: David Terei Date: Sat, 2 Mar 2013 18:09:51 -0800 Subject: [PATCH] Fix bug with reporting TX for ascii protocol. --- ConnectionAscii.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ConnectionAscii.cc b/ConnectionAscii.cc index 97c42fd..46a6a16 100644 --- a/ConnectionAscii.cc +++ b/ConnectionAscii.cc @@ -66,10 +66,10 @@ void ConnectionAscii::issue_set(const char* key, const char* value, int length, int l = evbuffer_add_printf(bufferevent_get_output(bev), "set %s 0 0 %d\r\n", key, length); - l += bufferevent_write(bev, value, length); - l += bufferevent_write(bev, "\r\n", 2); + bufferevent_write(bev, value, length); + bufferevent_write(bev, "\r\n", 2); - if (read_state != LOADING) stats.tx_bytes += l; + if (read_state != LOADING) stats.tx_bytes += l + length + 2; } void ConnectionAscii::read_callback() {