Skip to content

fs2-io is not closing ports when a DatagramChannel is used #3762

Description

@markehammons

On fs2 3.13.0. I was testing usage of DatagramChannel with some code of mine in an integration test and noted that subsequent tests/suites would fail with the error java.net.BindException: Address already in use.

Attached is a minimal test case that shows the failure. It's not sufficient to merely create the DatagramChannel, it has to be used in a read/write. I believe the Selector registration may be at fault, it may not be being closed:

https://stackoverflow.com/questions/12977164/datagramchannel-close-keeps-port-open-on-windows

https://scastie.scala-lang.org/GD6QuczvSRitJaMBrLyZPw

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions