We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43a0bf9 commit 23ebcceCopy full SHA for 23ebcce
internal/js/modules/k6/browser/common/connection.go
@@ -328,6 +328,7 @@ func (c *Connection) findTargetIDForLog(id target.SessionID) target.ID {
328
329
//nolint:funlen,gocognit,cyclop
330
func (c *Connection) recvLoop() {
331
+ decoder := jlexer.Lexer{}
332
var buffer bytes.Buffer
333
c.logger.Debugf("Connection:recvLoop", "wsURL:%q", c.wsURL)
334
for {
@@ -352,7 +353,8 @@ func (c *Connection) recvLoop() {
352
353
c.logger.Tracef("cdp:recv", "<- %s", buf)
354
355
var msg cdproto.Message
- c.decoder = jlexer.Lexer{Data: buf}
356
+ decoder.Data = buf
357
+ c.decoder = decoder
358
msg.UnmarshalEasyJSON(&c.decoder)
359
if err := c.decoder.Error(); err != nil {
360
select {
0 commit comments