mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(api): minor refactor to stream.go
This commit is contained in:
parent
540d3c2c6b
commit
6be394c2e0
1 changed files with 1 additions and 1 deletions
|
@ -27,12 +27,12 @@ func streamFromTCPConnToWebsocketConn(websocketConn *websocket.Conn, br *bufio.R
|
||||||
for {
|
for {
|
||||||
out := make([]byte, 2048)
|
out := make([]byte, 2048)
|
||||||
_, err := br.Read(out)
|
_, err := br.Read(out)
|
||||||
processedOutput := validString(string(out[:]))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorChan <- err
|
errorChan <- err
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processedOutput := validString(string(out[:]))
|
||||||
err = websocketConn.WriteMessage(websocket.TextMessage, []byte(processedOutput))
|
err = websocketConn.WriteMessage(websocket.TextMessage, []byte(processedOutput))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorChan <- err
|
errorChan <- err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue