blaze icon indicating copy to clipboard operation
blaze copied to clipboard

Stages which inherit from `Stage` spam the logs with unhandled `Disconnected` events.

Open andimiller opened this issue 6 years ago • 0 comments

When running any basic server with blaze on http4s 0.19.x the logs are spammed with

[blaze-selector-0-1] WARN  o.h.b.p.s.QuietTimeoutStage - org.http4s.blaze.pipeline.stages.QuietTimeoutStage Stage: 30 seconds received unhandled inbound command: Disconnected
[blaze-selector-0-1] WARN  o.h.s.b.Http1ServerStage$$anon$1 - Http4sServerStage received unhandled inbound command: Disconnected

This appears to be because of this block of code in core/src/main/scala/org/http4s/blaze/pipeline/Stages.scala

  def inboundCommand(cmd: InboundCommand): Unit = cmd match {
    case Connected => stageStartup()
    case _ => logger.warn(s"$name received unhandled inbound command: $cmd")
  }

Neither QuietTimeoutStage nor Http1ServerStage override this to handle Disconnected, and the handling for Disconnected was removed in this commit: https://github.com/http4s/blaze/commit/b4ef5f59dfeb8bf47dba2008aacf0cb98368ead0#diff-8b9a55120b4e25f24f77063998d50fe6L66

andimiller avatar Aug 29 '18 10:08 andimiller