diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-05-11 19:09:32 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-05-11 19:13:28 +0200 |
| commit | d6318a064954f54530a87ae9a21a2cf78c32f7cb (patch) | |
| tree | f2503798b8660c4e529cce191ddc8f57c6c27f23 | |
| parent | 3ccb8ad85c8777e417d1212bc19dc14b348fef4d (diff) | |
Give nodes a little more timeout time
| -rw-r--r-- | src/proto.h | 2 | ||||
| -rw-r--r-- | test/proto.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/proto.h b/src/proto.h index 328c9ca..8b65d3d 100644 --- a/src/proto.h +++ b/src/proto.h @@ -46,7 +46,7 @@ int token_validate(struct tokens* tokens, time_t now, struct addr* remote, char* #define MAX_DISC 32 #define MAX_INFLIGHT 128 -#define PROTO_UNCTM 60*5 +#define PROTO_UNCTM 60*20 #define PROTO_TMOUT 30 struct ping { diff --git a/test/proto.c b/test/proto.c index d876762..d8b8f72 100644 --- a/test/proto.c +++ b/test/proto.c @@ -234,9 +234,9 @@ void test_note_times_out() { proto_run(&dht, buff, sizeof(buff), (struct sockaddr_in*)&remote, remote_len, 5, &message_cursor, outbuff+2); } - // 15 minutes later a timeout is fired + // later a timeout is fired struct message* message_cursor = outbuff; - proto_run(&dht, NULL, 0, (struct sockaddr_in*)&remote, remote_len, 905, &message_cursor, outbuff+2); + proto_run(&dht, NULL, 0, (struct sockaddr_in*)&remote, remote_len, 1205, &message_cursor, outbuff+2); // Which should create a retry ping and a ping for the (now) uncertain node TEST_ASSERT_EQUAL_PTR(message_cursor, outbuff+2); |
