mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Add timeout message to the relay
This commit is contained in:
parent
d3f4cd8d8c
commit
1a69df1cd7
1 changed files with 2 additions and 0 deletions
|
|
@ -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']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue