Add timeout message to the relay

This commit is contained in:
Alex Gleason 2024-08-12 23:04:12 -05:00
parent d3f4cd8d8c
commit 1a69df1cd7
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -106,6 +106,8 @@ function connectStream(socket: WebSocket, ip: string | undefined) {
} catch (e) { } catch (e) {
if (e instanceof RelayError) { if (e instanceof RelayError) {
send(['CLOSED', subId, e.message]); send(['CLOSED', subId, e.message]);
} else if (e.message.includes('timeout')) {
send(['CLOSED', subId, 'error: the relay could not respond fast enough']);
} else { } else {
send(['CLOSED', subId, 'error: something went wrong']); send(['CLOSED', subId, 'error: something went wrong']);
} }