mirror of
https://github.com/yudai/gotty.git
synced 2025-12-26 12:18:49 +01:00
Merge pull request #13 from widdma/patch-1
Only send EOF in writable sessions
This commit is contained in:
commit
37dbf00503
1 changed files with 3 additions and 1 deletions
|
|
@ -177,7 +177,9 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
go func() {
|
||||
<-exit
|
||||
fio.Write([]byte{4})
|
||||
if app.PermitWrite {
|
||||
fio.Write([]byte{4})
|
||||
}
|
||||
fio.Close()
|
||||
conn.Close()
|
||||
log.Printf("Connection closed: %s", r.RemoteAddr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue