1
This commit is contained in:
1 parent
8e808ab948
commit
7c1c663e9e
1 file changed
+13
-2
+13
-2
@@ -652,6 +652,7 @@ void etcp_on_link_down(struct ETCP_CONN* etcp) {
|
||||
int was_up = etcp->links_up;
|
||||
etcp->links_up = up;
|
||||
if (up == 0 && was_up != 0) {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "All links fall down");
|
||||
etcp_on_down(etcp);
|
||||
}
|
||||
}
|
||||
@@ -692,7 +693,17 @@ static void etcp_conn_process_send_queue(struct ETCP_CONN* etcp) {// вызыв
|
||||
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "");
|
||||
struct ETCP_DGRAM* dgram;
|
||||
if (etcp->tx_state!=ETCP_TX_STATE_DATA_WAIT) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[%s] TX state: %d (link not ready, skip send)", etcp->log_name, etcp->tx_state);
|
||||
|
||||
|
||||
char l_status[256]={0};
|
||||
struct ETCP_LINK* link = etcp->links;
|
||||
while (link) {
|
||||
snprintf (l_status+strlen(l_status), 256-strlen(l_status), "L%d%d%c ", link->recv_keepalive, link->remote_keepalive, (link->shaper_timer==0)?'R':'W');
|
||||
link = link->next;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[%s] TX state: %d (link not ready, skip send) %s", etcp->log_name, etcp->tx_state, l_status);
|
||||
return;
|
||||
}
|
||||
dgram = etcp_request_pkt(etcp);
|
||||
@@ -710,7 +721,7 @@ struct ETCP_DGRAM* etcp_request_pkt(struct ETCP_CONN* etcp) {
|
||||
if (!link) {
|
||||
etcp->tx_state=ETCP_TX_STATE_LINK_WAIT;
|
||||
etcp->cnt_link_wait++;
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[%s] no link available", etcp->log_name);
|
||||
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "[%s] no link available", etcp->log_name);
|
||||
return NULL;// если линков нет - ждём появления свободного
|
||||
}
|
||||
etcp->tx_state=ETCP_TX_STATE_DATA_WAIT;
|
||||
|
||||
Reference in new issue
Block a user