Skip to content

Commit

Permalink
Close span writer
Browse files Browse the repository at this point in the history
Signed-off-by: Davit Yeghshatyan <davo@uber.com>
  • Loading branch information
Davit Yeghshatyan committed Jul 30, 2018
1 parent 5cdfb87 commit 79a55d6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/ingester/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"fmt"
"io"
"log"
"os"
"os/signal"
Expand Down Expand Up @@ -99,7 +100,13 @@ func main() {
case <-signalsChannel:
err := kafkaConsumer.Close()
if err != nil {
logger.Error("Failed to close span writer", zap.Error(err))
logger.Error("Failed to close consumer", zap.Error(err))
}
if closer, ok := spanWriter.(io.Closer); ok {
err := closer.Close()
if err != nil {
logger.Error("Failed to close span writer", zap.Error(err))
}
}
logger.Info("Jaeger Ingester is finishing")
}
Expand Down

0 comments on commit 79a55d6

Please sign in to comment.