Skip to content

Commit

Permalink
test: shell change.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Jan 31, 2024
1 parent 6935950 commit 03f4a31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/msggateway/n_ws_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func NewWsServer(opts ...Option) (*WsServer, error) {
unregisterChan: make(chan *Client, 1000),
kickHandlerChan: make(chan *kickHandler, 1000),
validate: v,
clients: newUserMap(10),
clients: newUserMap(100),
Compressor: NewGzipCompressor(),
Encoder: NewGobEncoder(),
}, nil
Expand Down
5 changes: 4 additions & 1 deletion internal/msggateway/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ var (
r.SendID = ""
r.Token = ""
})
gzipWriterPool = NewPool[*gzip.Writer](func() *gzip.Writer { return gzip.NewWriter(nil) }, nil)
gzipWriterPool = NewPool[*gzip.Writer](func() *gzip.Writer {
w, _ := gzip.NewWriterLevel(nil, gzip.BestSpeed)
return w
}, nil)
gzipReaderPool = NewPool[*gzip.Reader](func() *gzip.Reader { return new(gzip.Reader) }, nil)
)

Expand Down

0 comments on commit 03f4a31

Please sign in to comment.