Skip to content

Commit 27ec431

Browse files
OttoWinterserek4
authored andcommitted
Remove _tx_unsent_len (OttoWinter#3)
(cherry picked from commit 3326b8c)
1 parent b6af6c1 commit 27ec431

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/ESPAsyncTCP.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ AsyncClient::AsyncClient(tcp_pcb* pcb):
179179
, _ack_pcb(true)
180180
, _tx_unacked_len(0)
181181
, _tx_acked_len(0)
182-
, _tx_unsent_len(0)
183182
, _rx_ack_len(0)
184183
, _rx_last_packet(0)
185184
, _rx_since_timeout(0)
@@ -410,7 +409,7 @@ size_t AsyncClient::add(const char* data, size_t size, uint8_t apiflags) {
410409
ASYNC_TCP_DEBUG("_add[%u]: tcp_write() returned err: %s(%ld)\n", getConnectionId(), errorToString(err), err);
411410
return 0;
412411
}
413-
_tx_unsent_len += will_send;
412+
_tx_unacked_len += will_send;
414413
return will_send;
415414
}
416415

@@ -423,13 +422,10 @@ bool AsyncClient::send(){
423422
if(err == ERR_OK){
424423
_pcb_busy = true;
425424
_pcb_sent_at = millis();
426-
_tx_unacked_len += _tx_unsent_len;
427-
_tx_unsent_len = 0;
428425
return true;
429426
}
430427

431428
ASYNC_TCP_DEBUG("send[%u]: tcp_output() returned err: %s(%ld)", getConnectionId(), errorToString(err), err);
432-
_tx_unsent_len = 0;
433429
return false;
434430
}
435431

src/ESPAsyncTCP.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ class AsyncClient {
136136
bool _ack_pcb;
137137
uint32_t _tx_unacked_len;
138138
uint32_t _tx_acked_len;
139-
uint32_t _tx_unsent_len;
140139
uint32_t _rx_ack_len;
141140
uint32_t _rx_last_packet;
142141
uint32_t _rx_since_timeout;

0 commit comments

Comments
 (0)