Send EOT before exiting

The processes were left behind when clients closed their windows.
This commit is contained in:
Iwasaki Yudai 2015-08-16 22:24:24 -07:00
parent 1c8b87df90
commit 2050775288

View File

@ -201,6 +201,7 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) {
go func() {
<-exit
fio.Write([]byte{4})
fio.Close()
conn.Close()
log.Printf("Connection closed: %s", r.RemoteAddr)