Send EOT before exiting
The processes were left behind when clients closed their windows.
This commit is contained in:
@@ -201,6 +201,7 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
<-exit
|
<-exit
|
||||||
|
fio.Write([]byte{4})
|
||||||
fio.Close()
|
fio.Close()
|
||||||
conn.Close()
|
conn.Close()
|
||||||
log.Printf("Connection closed: %s", r.RemoteAddr)
|
log.Printf("Connection closed: %s", r.RemoteAddr)
|
||||||
|
|||||||
Reference in New Issue
Block a user