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

View File

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