1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-04 17:33:21 +08:00

Remove writer if websocket disconnects

This commit is contained in:
Marcos Lilljedahl
2016-10-08 15:04:30 +02:00
parent b3e7dcae3b
commit 97f39ca375
2 changed files with 3 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ func NewSession() (*types.Session, error) {
s = GetSession(s.Id)
log.Printf("Starting clean up of session [%s]\n", s.Id)
for _, i := range s.Instances {
i.Conn.Close()
if err := DeleteContainer(i.Name); err != nil {
log.Println(err)
}