Commit 37dbf005 by Iwasaki Yudai

Merge pull request #13 from widdma/patch-1

Only send EOF in writable sessions
2 parents 6ece5141 8e5a277b
Showing with 2 additions and 0 deletions
...@@ -177,7 +177,9 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) { ...@@ -177,7 +177,9 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) {
go func() { go func() {
<-exit <-exit
if app.PermitWrite {
fio.Write([]byte{4}) 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)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!