Skip to content

Commit

Permalink
Do not report fatal error when cmux.ErrServerClosed (open-telemetry#3703
Browse files Browse the repository at this point in the history
)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored and emaderer committed Jul 30, 2021
1 parent e085b32 commit fcce067
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/opencensusreceiver/opencensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@ func (ocr *ocReceiver) startServer(host component.Host) error {
}
}()
go func() {
if errHTTP := ocr.httpServer().Serve(httpL); errHTTP != http.ErrServerClosed {
if errHTTP := ocr.httpServer().Serve(httpL); errHTTP != nil && errHTTP != http.ErrServerClosed {
host.ReportFatalError(errHTTP)
}
}()
go func() {
if errServe := m.Serve(); errServe != nil {
if errServe := m.Serve(); errServe != nil && errServe != cmux.ErrServerClosed {
host.ReportFatalError(errServe)
}
}()
Expand Down

0 comments on commit fcce067

Please sign in to comment.