Skip to content

Commit

Permalink
WithDecoderConcurrency (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohkinozomu authored Nov 28, 2023
1 parent 64c77ed commit 835d5b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion internal/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ func newServer(c AgentConfig) server {
c.Logger.Fatal(err.Error())
}

decoder, err := zstd.NewReader(nil)
decoder, err := zstd.NewReader(
nil,
zstd.WithDecoderConcurrency(1),
)
if err != nil {
c.Logger.Fatal(err.Error())
}
Expand Down
5 changes: 4 additions & 1 deletion internal/hub/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ func newClient(c HubConfig, payloadCh chan []byte) *autopaho.ConnectionManager {
}

func newServer(c HubConfig) server {
decoder, err := zstd.NewReader(nil)
decoder, err := zstd.NewReader(
nil,
zstd.WithDecoderConcurrency(1),
)
if err != nil {
c.Logger.Fatal(err.Error())
}
Expand Down

0 comments on commit 835d5b3

Please sign in to comment.