XoverClient times replies only, not idle time between commands
A seeding node that waited over two minutes for the seed API (restarting) had its idle NNTP connection closed by its own timeout, and gave its range back. Now the timeout runs only while a reply is awaited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
00f6187b8f
commit
04f945055f
2 files changed
+41
-5
No files matched your search
@@ -73,4 +73,17 @@ test.group('nntp / XoverClient', () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
test('idle time between commands does not count against the reply timeout', async ({ assert }) => {
|
||||
const { port, close } = await server()
|
||||
const client = await XoverClient.connect({ host: '127.0.0.1', port, user: 'u', password: 'p', compress: true, timeoutMs: 200 })
|
||||
try {
|
||||
await client.group('a.b.test')
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
assert.lengthOf(await client.xover(101, 102), 2)
|
||||
} finally {
|
||||
client.close()
|
||||
close()
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user