coder / coder/websocket

Add protection against concurrent Readers

Abierto
#391 20 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Go
Estrellas
5.5k
Forks
372
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

During my use of the library(server and client both v1.8.7), the server occasionally receives the following prompt,

```
failed to get reader: received header with unexpected rsv bits set: false:true:true
```

which seems to be related to this part of the code.

**write.go** L300:

```
c.writeHeader.rsv1 = false
if flate && (opcode == opText || opcode == opBinary) {
c.writeHeader.rsv1 = true
}
```

Could you please confirm if it is necessary to add the following code here?

```
c.writeHeader.rsv1 = false
c.writeHeader.rsv2 = false
c.writeHeader.rsv3 = false
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.