Browse Source

1

nodeinfo-routing-update
jeka 2 weeks ago
parent
commit
1a19f380ab
  1. 2
      src/etcp.c
  2. 4
      src/etcp_connections.c

2
src/etcp.c

@ -284,7 +284,7 @@ void etcp_conn_reset(struct ETCP_CONN* etcp) {
queue_resume_callback(etcp->input_send_q);
queue_resume_callback(etcp->input_wait_ack);
queue_resume_callback(etcp->recv_q);
// queue_resume_callback(etcp->ack_q);
queue_resume_callback(etcp->ack_q);
etcp->tx_state=ETCP_TX_STATE_DATA_WAIT;

4
src/etcp_connections.c

@ -899,9 +899,11 @@ static void etcp_connections_read_callback_socket(socket_t sock, void* arg) {
} *ack_repl_hdr=(void*)&pkt->data[0];
// Set response code: 0x03 (with reset) or 0x05 (without reset)
if (send_reset || new_conn || ack_hdr->code == ETCP_INIT_REQUEST) {
if (send_reset != 0 || new_conn != 0 || ack_hdr->code == ETCP_INIT_REQUEST) {
DEBUG_TRACE(DEBUG_CATEGORY_CONNECTION, "send init_response with reset");
ack_repl_hdr->code = ETCP_INIT_RESPONSE; // 0x03 - with reset
} else {
DEBUG_TRACE(DEBUG_CATEGORY_CONNECTION, "send init_response without reset");
ack_repl_hdr->code = ETCP_INIT_RESPONSE_NOINIT; // 0x05 - without reset
}
*(uint64_t*)ack_repl_hdr->id = htobe64(e_sock->instance->node_id);

Loading…
Cancel
Save