Untrack stopped terminals

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-08-02 14:47:14 -03:00
parent 0655a4bb99
commit e2e458b681

View File

@@ -50,6 +50,11 @@ func WS(so socketio.Socket) {
go func(instanceName string, c net.Conn, ws socketio.Socket) {
defer c.Close()
defer func() {
rw.Lock()
defer rw.Unlock()
delete(trackedTerminals, instanceName)
}()
encoder := encoding.Replacement.NewEncoder()
buf := make([]byte, 1024)
for {