mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 12:24:25 +00:00
Merge pull request #13 from widdma/patch-1
Only send EOF in writable sessions
This commit is contained in:
commit
37dbf00503
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user