Use chan struct for http connection closed channel
This commit is contained in:
parent
e70cdce87e
commit
d5ee46ab17
1 changed files with 2 additions and 2 deletions
4
db/db.go
4
db/db.go
|
@ -140,10 +140,10 @@ func Process(ctx *fibre.Context, ast *sql.Query, vars map[string]interface{}) (o
|
||||||
// connection then force quit any running
|
// connection then force quit any running
|
||||||
// queries if a socket close event occurs.
|
// queries if a socket close event occurs.
|
||||||
|
|
||||||
if _, ok := ctx.Response().ResponseWriter.(http.CloseNotifier); ok {
|
if _, ok := ctx.Response().Writer().(http.CloseNotifier); ok {
|
||||||
|
|
||||||
exit := ctx.Response().CloseNotify()
|
exit := ctx.Response().CloseNotify()
|
||||||
done := make(chan bool)
|
done := make(chan struct{})
|
||||||
defer close(done)
|
defer close(done)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
|
Loading…
Reference in a new issue