mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 20:34:26 +00:00
Send EOT before exiting
The processes were left behind when clients closed their windows.
This commit is contained in:
parent
1c8b87df90
commit
2050775288
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user