mirror of
https://github.com/yudai/gotty.git
synced 2025-09-22 05:50:48 +02:00
Merge pull request #68 from QuentinPerez/mutex
Added mutex to avoid concurrent writes
This commit is contained in:
commit
096f77c780
2 changed files with 32 additions and 15 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"text/template"
|
||||
|
||||
"github.com/braintree/manners"
|
||||
|
@ -243,6 +244,7 @@ func (app *App) handleWS(w http.ResponseWriter, r *http.Request) {
|
|||
connection: conn,
|
||||
command: cmd,
|
||||
pty: ptyIo,
|
||||
writeMutex: &sync.Mutex{},
|
||||
}
|
||||
|
||||
context.goHandleClient()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue