Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #364 from aerokube/demux_logs
Browse files Browse the repository at this point in the history
right demultiplex for docker logs
  • Loading branch information
aandryashin authored Mar 4, 2018
2 parents 3a0a9ce + eb0ed77 commit f68af81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion selenoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/aerokube/selenoid/util"
"github.com/docker/docker/api/types"
"golang.org/x/net/websocket"
"github.com/docker/docker/pkg/stdcopy"
)

var (
Expand Down Expand Up @@ -490,7 +491,7 @@ func logs(wsconn *websocket.Conn) {
}
defer r.Close()
wsconn.PayloadType = websocket.BinaryFrame
io.Copy(wsconn, r)
stdcopy.StdCopy(wsconn, wsconn, r)
log.Printf("[%d] [CONTAINER_LOGS_DISCONNECTED] [%s]", requestId, sid)
} else {
log.Printf("[%d] [SESSION_NOT_FOUND] [%s]", requestId, sid)
Expand Down

0 comments on commit f68af81

Please sign in to comment.