Strange situation after closing subscription connection from playground
- Linguagem predominante
- Go
- Estrelas
- 10.8k
- Forks
- 1.3k
- Merge médio
- 2d 36min
- PRs com merge (30d)
- 26
Descrição
### What happened?
"ka" frame sending from server to client (graphql web playground) after closing connection ("stop" frame).
### What did you expect?
Connection fully closed, "stop" frame from client and "complete" frame from server are last.
### Minimal graphql.schema and models to reproduce
> type Subscription {
> recommendations: RecommendationElement!
> }
>
> union RecommendationElement = InfoPopup
>
> type InfoPopup {
> title: String!
> }
### versions
- `gqlgen version`: v0.9.0
- `go version`: go1.13.3 darwin/amd64
- dep or go modules? go modules
Hello!
We have one issue with webSocket subscriptions, which reproduced constantly with GraphIQL (Playground):
1) Playground establish connection with server, first frames are "connection init", "start" and "connection_ack";
2) Then server sends some "ka" frames (we use keep alive duration 10 seconds);
3) Then connection stops, using Playground stop button, client sends "stop" and server answers "complete";
4) After this "ka" frames continue coming to client, and this process stopped only, when Web-Server (we use Ingress in GKE), closed client->server connection after timeout;

Seems, "ka" frames ticker must be stopped after "stop" and "complete" message, because go routine continue work without any profit.
Would you help us to solve this problem? Thanks.
Guia de contribuição
Direção de pesquisa
Examine o código de tratamento de assinaturas WebSocket, provavelmente na camada de transporte onde os temporizadores de keep-alive são gerenciados. A issue menciona uma duração de keep-alive de 10 segundos. Encontre onde o frame 'stop' é processado e certifique-se de que o ticker correspondente seja interrompido. Verifique se há vazamentos de goroutines. Executar os testes de assinatura existentes deve ajudar a verificar a correção.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- go, graphql
- Domínio
- api, backend
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 45/100