diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/TCP_client.c | 4 | ||||
-rw-r--r-- | toxcore/TCP_server.c | 4 |
2 files changed, 4 insertions, 4 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 | } |
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c index f3cdd287..47e2ff27 100644 --- a/toxcore/TCP_server.c +++ b/toxcore/TCP_server.c | |||
@@ -411,10 +411,10 @@ static int write_packet_TCP_secure_connection(TCP_Secure_Connection *con, const | |||
411 | 411 | ||
412 | if (len <= 0) { | 412 | if (len <= 0) { |
413 | len = 0; | 413 | len = 0; |
414 | } else { | ||
415 | increment_nonce(con->sent_nonce); | ||
416 | } | 414 | } |
417 | 415 | ||
416 | increment_nonce(con->sent_nonce); | ||
417 | |||
418 | if (len == sizeof(packet)) { | 418 | if (len == sizeof(packet)) { |
419 | return 1; | 419 | return 1; |
420 | } | 420 | } |