1.19.30 support, improve error handling and server pong data (#284)
* Update server advertisement * 1.19.30 protocol support * Handle configurable compressor * Support updated 1.19.30 login flow with NetworkSettings * Improve serialization error handling on client * refactor compressor handling * Fix client on older versions, fix internal error handling * Improve error handling * Log console connection errors; use raknet-native for proxy test
This commit is contained in:
parent
30c583fcf3
commit
f88c8d0bc4
13 changed files with 205 additions and 68 deletions
|
|
@ -201,9 +201,9 @@ async function requestChunks (version, x, z, radius) {
|
|||
}
|
||||
|
||||
async function timedTest (version, timeout = 1000 * 220) {
|
||||
await waitFor((res) => {
|
||||
await waitFor((resolve, reject) => {
|
||||
// mocha eats up stack traces...
|
||||
startTest(version, res).catch(console.error)
|
||||
startTest(version, resolve).catch(reject)
|
||||
}, timeout, () => {
|
||||
throw Error('timed out')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const { createClient, Server, Relay } = require('bedrock-protocol')
|
||||
const { sleep, waitFor } = require('../src/datatypes/util')
|
||||
|
||||
function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40) {
|
||||
function proxyTest (version, raknetBackend = 'raknet-native', timeout = 1000 * 40) {
|
||||
console.log('with raknet backend', raknetBackend)
|
||||
return waitFor(async res => {
|
||||
const SERVER_PORT = 19000 + ((Math.random() * 100) | 0)
|
||||
|
|
@ -60,8 +60,8 @@ function proxyTest (version, raknetBackend = 'raknet-node', timeout = 1000 * 40)
|
|||
}, timeout, () => { throw Error('timed out') })
|
||||
}
|
||||
|
||||
if (!module.parent) {
|
||||
proxyTest('1.16.220', 'raknet-native')
|
||||
}
|
||||
// if (!module.parent) {
|
||||
// proxyTest('1.16.220', 'raknet-native')
|
||||
// }
|
||||
|
||||
module.exports = { proxyTest }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue