summaryrefslogtreecommitdiff
path: root/toxcore/TCP_client.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-16 20:39:58 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-16 20:39:58 -0400
commitbcfb1261ac4ab5f6470924f473c8c18bc5f98f01 (patch)
tree6e9c800830bb8a6d8df8534c01e86babf3e1b92d /toxcore/TCP_client.c
parent1e69af8cff35fa1455a861130a2f936563b2c2ad (diff)
Fixed possible bug with TCP nonce not getting incremented.
Diffstat (limited to 'toxcore/TCP_client.c')
-rw-r--r--toxcore/TCP_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c
index 02d4e7dc..45220538 100644
--- a/toxcore/TCP_client.c
+++ b/toxcore/TCP_client.c
@@ -231,10 +231,10 @@ static int write_packet_TCP_secure_connection(TCP_Client_Connection *con, const
231 231
232 if (len <= 0) { 232 if (len <= 0) {
233 len = 0; 233 len = 0;
234 } else {
235 increment_nonce(con->sent_nonce);
236 } 234 }
237 235
236 increment_nonce(con->sent_nonce);
237
238 if (len == sizeof(packet)) { 238 if (len == sizeof(packet)) {
239 return 1; 239 return 1;
240 } 240 }