Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/standalone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"fmt"
"io"
"log"
"net"
"net/http"
Expand Down Expand Up @@ -130,6 +131,13 @@ func main() {

select {
case <-signalsChannel:
if closer, ok := spanWriter.(io.Closer); ok {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about spanReader, dependencyReader, etc. might be easier to register everything that implements the io.Closer interface during initialization and iterate over them and close them

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readers don't implement closer. This is just port from collector main.

err := closer.Close()
if err != nil {
logger.Error("Failed to close span writer", zap.Error(err))
}
}

logger.Info("Jaeger Standalone is finishing")
}
return nil
Expand Down