File tree 1 file changed +12
-9
lines changed 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 7
7
8
8
export const enum CloseCode {
9
9
ClosingNormal = 1000 ,
10
- GoingAway ,
11
- NoSharedSubprotocol ,
10
+ GoingAway = 1001 ,
11
+ NoSharedSubprotocol = 1002 ,
12
12
PathFull = 3000 ,
13
- ProtocolError ,
14
- InternalError ,
15
- Handover ,
16
- DroppedByInitiator ,
17
- InitiatorCouldNotDecrypt ,
18
- NoSharedTask ,
19
- InvalidKey ,
13
+ ProtocolError = 3001 ,
14
+ InternalError = 3002 ,
15
+ Handover = 3003 ,
16
+ DroppedByInitiator = 3004 ,
17
+ InitiatorCouldNotDecrypt = 3005 ,
18
+ NoSharedTask = 3006 ,
19
+ InvalidKey = 3007 ,
20
+ Timeout = 3008 ,
20
21
}
21
22
22
23
export function explainCloseCode ( code : CloseCode ) : string {
@@ -43,6 +44,8 @@ export function explainCloseCode(code: CloseCode): string {
43
44
return 'No shared task was found' ;
44
45
case CloseCode . InvalidKey :
45
46
return 'Invalid key' ;
47
+ case CloseCode . Timeout :
48
+ return 'Timeout' ;
46
49
default :
47
50
return 'Unknown' ;
48
51
}
You can’t perform that action at this time.
0 commit comments