summaryrefslogtreecommitdiffstats
path: root/golib/eows/eows-out.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 21:35:42 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 21:35:42 +0100
commitd2cf661e547cbf901d2d643f0ff29c2f205d599a (patch)
treef11a94104c3ebfb84d907e3d4c947dcdbacbadf8 /golib/eows/eows-out.go
parent6a938e20abc6c4b61683db447f912f67482f4779 (diff)
Fixed reported error and logging.v0.1.8
Diffstat (limited to 'golib/eows/eows-out.go')
-rw-r--r--golib/eows/eows-out.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/golib/eows/eows-out.go b/golib/eows/eows-out.go
index 2a6b110..6f6706c 100644
--- a/golib/eows/eows-out.go
+++ b/golib/eows/eows-out.go
@@ -24,13 +24,13 @@ func (e *ExecOverWS) cmdPumpStdout(r io.Reader, done chan struct{}) {
// else use default sc.ScanLines
if e.OutSplit == SplitChar {
- sc.Split(scanBlocks)
+ sc.Split(scanBlocks)
}
for sc.Scan() {
e.OutputCB(e, sc.Text(), "")
}
- if sc.Err() != nil {
+ if sc.Err() != nil && !strings.Contains(sc.Err().Error(), "file already closed") {
e.logError("stdout scan: %v", sc.Err())
}
@@ -46,13 +46,13 @@ func (e *ExecOverWS) cmdPumpStderr(r io.Reader) {
// else use default sc.ScanLines
if e.OutSplit == SplitChar {
- sc.Split(scanBlocks)
+ sc.Split(scanBlocks)
}
for sc.Scan() {
e.OutputCB(e, "", sc.Text())
}
- if sc.Err() != nil {
+ if sc.Err() != nil && !strings.Contains(sc.Err().Error(), "file already closed") {
e.logError("stderr scan: %v", sc.Err())
}
}