Closed michaelbeaumont closed 3 years ago
I like the idea of splitting the listen and serve up.
I recently added some "hacky" tests on the errors channel, for increasing coverage. I'll quickly investigate where exactly they are breaking and suggest a solution to the failing test.
It's still a little cumbersome to use because
Start()
blocks but this makes it possible to use0
as the port and let the system pick a port then later see which port was chosen, useful for testing.
You could also modify the Start
to accept the full listen address (i.e. :8080
). That way, you're not just limited to the port. Just an idea.
Yeah, I was going to add that separately but changing the listening IP is useful too. But unrelated to setting port to 0
, right?
Yeah, I was going to add that separately but changing the listening IP is useful too. But unrelated to setting port to
0
, right?
Yes, it's unrelated. Feel free to add it in a follow-up MR. It would be a breaking change as well, so no rush.
It's still a little cumbersome to use because
Start()
blocks but this makes it possible to use0
as the port and let the system pick a port then later see which port was chosen, useful for testing.