From b232c09b01c969c3251c0924865f08824e7ae738 Mon Sep 17 00:00:00 2001 From: Zhi Wang Date: Wed, 5 Jan 2022 21:33:11 -0500 Subject: [PATCH] wip --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index b2ebbd3..d935f7b 100644 --- a/main.go +++ b/main.go @@ -81,6 +81,8 @@ func wsHandler(w http.ResponseWriter, r *http.Request) { defer func() { //close the terminal and restore the terminal state + ptmx.Close() + if termState != nil { term.Restore(int(os.Stdin.Fd()), termState) }