@@ -177,10 +177,11 @@ func getContainerWait(ctx context.Context, hostAddress string, config *logging.C
177
177
// If task was not found, it's possible that the container runtime is still being created.
178
178
// Retry every 100ms.
179
179
ticker := time .NewTicker (100 * time .Millisecond )
180
+ defer ticker .Stop ()
180
181
for {
181
182
select {
182
183
case <- ctx .Done ():
183
- return nil , fmt . Errorf ("timed out waiting for container task to start" )
184
+ return nil , errors . New ("timed out waiting for container task to start" )
184
185
case <- ticker .C :
185
186
task , err = con .Task (ctx , nil )
186
187
if err != nil {
@@ -207,7 +208,7 @@ func loggingProcessAdapter(ctx context.Context, driver Driver, dataStore, hostAd
207
208
buf := make ([]byte , 32 << 10 )
208
209
_ , err := io .CopyBuffer (writer , reader , buf )
209
210
if err != nil {
210
- logrus . Errorf ("failed to copy stream: %s " , err )
211
+ log . L . Errorf ("failed to copy stream: %v " , err )
211
212
}
212
213
}
213
214
go copyStream (config .Stdout , stdoutW )
@@ -244,7 +245,7 @@ func loggingProcessAdapter(ctx context.Context, driver Driver, dataStore, hostAd
244
245
245
246
exitCh , err := getContainerWait (ctx , hostAddress , config )
246
247
if err != nil {
247
- logrus .Errorf ("failed to get container task wait channel: %v" , err )
248
+ log . L .Errorf ("failed to get container task wait channel: %v" , err )
248
249
return
249
250
}
250
251
<- exitCh
0 commit comments