Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass maxConnections correctly #4337

merged 3 commits into from Feb 2, 2021


Copy link

No description provided.

Copy link

Needs scalafmt

Copy link

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

I'm so burnt out I still don't see the mistake. Are the named arguments in a different order in the definition of fixed?

I trust that it's right, but if someone can describe it for the changelog, that would be swell.

Copy link
Member Author

RaasAhsan commented Feb 2, 2021

The type signature of fixed:

def fixed(
      workerThreads: Int = DefaultPoolSize,
      bufferSize: Int = DefaultBufferSize,
      channelOptions: ChannelOptions = ChannelOptions.DefaultOptions,
      selectorThreadFactory: ThreadFactory = defaultWorkerThreadFactory,
      acceptorThreads: Int = 1,
      acceptorThreadFactory: ThreadFactory = defaultAcceptorThreadFactory,
      maxConnections: Int = DefaultMaxConnections
  ): ServerChannelGroup

We were passing in maxConnections to acceptorThreads since it wasn't named explicitly, and the formal parameter maxConnections was taking the default. I just added the names to all the parameters for consistency

If we went through with the MaxConnections trait this would've been caught :'( 20/20 hindsight

Copy link

Got it. Thanks for digging. I've got three hours' sleep and two barking dogs. Yeah, this is bad.

@rossabaker rossabaker merged commit 1ef3cf4 into http4s:series/0.21 Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

5 participants