max: set max websocket book default level

This commit is contained in:
c9s 2024-01-24 13:52:33 +08:00
parent 41529264b7
commit e6f911380d
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -91,7 +91,7 @@ func (s *Stream) handleConnect() {
if len(sub.Options.Depth) > 0 { if len(sub.Options.Depth) > 0 {
switch sub.Options.Depth { switch sub.Options.Depth {
case types.DepthLevelFull: case types.DepthLevelFull:
depth = 0 depth = 50
case types.DepthLevelMedium: case types.DepthLevelMedium:
depth = 20 depth = 20
@ -102,6 +102,9 @@ func (s *Stream) handleConnect() {
case types.DepthLevel5: case types.DepthLevel5:
depth = 5 depth = 5
default:
depth = 20
} }
} }