1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 01:43:22 +08:00

Use docker 1.13 to allow overlay networks

- Print error if resizing fails
This commit is contained in:
Marcos Lilljedahl
2016-11-13 01:09:29 -03:00
parent b37f2469c8
commit 54378862b3
5 changed files with 19 additions and 9 deletions

View File

@@ -1,6 +1,10 @@
package services
import "github.com/googollee/go-socket.io"
import (
"log"
"github.com/googollee/go-socket.io"
)
type ViewPort struct {
Rows uint
@@ -41,7 +45,10 @@ func NewClient(so socketio.Socket, session *Session) *Client {
// Resize all terminals in the session
wsServer.BroadcastTo(session.Id, "viewport resize", vp.Cols, vp.Rows)
for _, instance := range session.Instances {
instance.ResizeTerminal(vp.Cols, vp.Rows)
err := instance.ResizeTerminal(vp.Cols, vp.Rows)
if err != nil {
log.Println("Error resizing terminal", err)
}
}
})
so.On("disconnection", func() {