Browse Source

Keep newer INFO probes alive when old queued probes expire

master
evgeny 1 week ago
parent
commit
0282fe7e17
  1. 1
      src/stream/stream_network.c

1
src/stream/stream_network.c

@ -774,6 +774,7 @@ static void expire_controls(struct stream_peer *p, uint64_t now) {
if (stream_wire_parse(e->dgram, e->len, &m) == STREAM_OK) {
int outgoing = m.command == STREAM_CMD_INFO_REQ || m.command == STREAM_CMD_SUBSCRIBE;
struct STREAM_RECEIVE *f = flow_find(p, &m, outgoing);
if (f && m.command == STREAM_CMD_INFO_REQ && (m.length != 8 || stream_read_be(m.payload, 8) != f->probe)) f = NULL;
if (f && (outgoing || m.command == STREAM_CMD_ACCEPT)) flow_close(f, STREAM_REASON_OVERLOAD, 0);
DEBUG_WARN(DEBUG_CATEGORY_STREAM, "stream control expired peer=%llx command=%u handle=%llu age=%llu",
(unsigned long long)p->node_id, m.command, (unsigned long long)m.handle, (unsigned long long)(now - queued_ms));

Loading…
Cancel
Save