Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

listen on $TCHANNEL_PORT if it's available #289

Open
blampe opened this issue Feb 5, 2016 · 5 comments
Open

listen on $TCHANNEL_PORT if it's available #289

blampe opened this issue Feb 5, 2016 · 5 comments

Comments

@blampe
Copy link
Contributor

blampe commented Feb 5, 2016

If we're not explicitly provided a port to listen on, but we have a TCHANNEL_PORT environment variable available, then we should prefer to listen on that port instead of dynamically picking one.

@Raynos
Copy link
Contributor

Raynos commented Feb 6, 2016

This belongs in one line init.

We need to author and support one line init.

The listen() call takes mandatory port and ip.

The cheapest change would be to update weaver template with copy+pasted ENV parsing code.

@blampe
Copy link
Contributor Author

blampe commented Feb 6, 2016

We want to be able to pick this up with a client lib bump. Do you mean people are explicitly passing in port 0?

@Raynos
Copy link
Contributor

Raynos commented Feb 6, 2016

Explicit zero or static.

Everyone passes in explicit ip from "my-local-ip" library.

@blampe
Copy link
Contributor Author

blampe commented Feb 6, 2016

This could still be done all in the client library -- if we're passed a port of 0 but this environment variable is set, then prefer the environment's port.

@Raynos
Copy link
Contributor

Raynos commented Feb 16, 2016

I think this kind of global state reading belongs in one-line-init.

It's unreasonable for the channel.listen() call to read global state.

We should get a one line init going.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants