99designs / 99designs/gqlgen

Strange situation after closing subscription connection from playground

オープン
#952 コメント 4 件 リアクション 2 件 担当者 0 名 GitHub で見る
accepted
主要言語
Go
スター
10.8k
フォーク
1.3k
平均マージ
2日 36分
マージ済み PR(30日)
26

説明

### 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;

![image](https://user-images.githubusercontent.com/26578732/70395446-cd55b800-1a0f-11ea-8cdc-7d78ced23fe4.png)

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。