... | ... |
@@ -161,14 +161,14 @@ func (container *Container) startPty() error { |
161 | 161 |
|
162 | 162 |
// Copy the PTYs to our broadcasters |
163 | 163 |
go func() { |
164 |
- defer container.stdout.Close() |
|
164 |
+ defer container.stdout.CloseWriters() |
|
165 | 165 |
Debugf("[startPty] Begin of stdout pipe") |
166 | 166 |
io.Copy(container.stdout, stdoutMaster) |
167 | 167 |
Debugf("[startPty] End of stdout pipe") |
168 | 168 |
}() |
169 | 169 |
|
170 | 170 |
go func() { |
171 |
- defer container.stderr.Close() |
|
171 |
+ defer container.stderr.CloseWriters() |
|
172 | 172 |
Debugf("[startPty] Begin of stderr pipe") |
173 | 173 |
io.Copy(container.stderr, stderrMaster) |
174 | 174 |
Debugf("[startPty] End of stderr pipe") |
... | ... |
@@ -374,10 +374,10 @@ func (container *Container) monitor() { |
374 | 374 |
if err := container.releaseNetwork(); err != nil { |
375 | 375 |
log.Printf("%v: Failed to release network: %v", container.Id, err) |
376 | 376 |
} |
377 |
- if err := container.stdout.Close(); err != nil { |
|
377 |
+ if err := container.stdout.CloseWriters(); err != nil { |
|
378 | 378 |
Debugf("%s: Error close stdout: %s", container.Id, err) |
379 | 379 |
} |
380 |
- if err := container.stderr.Close(); err != nil { |
|
380 |
+ if err := container.stderr.CloseWriters(); err != nil { |
|
381 | 381 |
Debugf("%s: Error close stderr: %s", container.Id, err) |
382 | 382 |
} |
383 | 383 |
if err := container.Unmount(); err != nil { |
... | ... |
@@ -242,7 +242,7 @@ func (w *writeBroadcaster) Write(p []byte) (n int, err error) { |
242 | 242 |
return len(p), nil |
243 | 243 |
} |
244 | 244 |
|
245 |
-func (w *writeBroadcaster) Close() error { |
|
245 |
+func (w *writeBroadcaster) CloseWriters() error { |
|
246 | 246 |
w.mu.Lock() |
247 | 247 |
defer w.mu.Unlock() |
248 | 248 |
for writer := range w.writers { |