Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lxzan committed Jan 19, 2024
1 parent 826777e commit 92dae99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ func BenchmarkConn_ReadMessage(b *testing.B) {
var conn1 = &Conn{
isServer: false,
conn: &benchConn{},
pd: PermessageDeflate{Enabled: true},
pd: upgrader.option.PermessageDeflate,
config: config,
deflater: new(deflater),
}
conn1.deflater.initialize(false, conn1.pd)
var buf, _ = conn1.genFrame(OpcodeText, githubData, false)

var reader = bytes.NewBuffer(buf.Bytes())
Expand All @@ -104,7 +106,7 @@ func BenchmarkConn_ReadMessage(b *testing.B) {
conn: &benchConn{},
br: bufio.NewReader(reader),
config: upgrader.option.getConfig(),
pd: PermessageDeflate{Enabled: true},
pd: upgrader.option.PermessageDeflate,
handler: upgrader.eventHandler,
deflater: upgrader.deflaterPool.Select(),
}
Expand Down

0 comments on commit 92dae99

Please sign in to comment.