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

init(Port) args #12

Open
cdx08222028 opened this issue Feb 1, 2019 · 0 comments
Open

init(Port) args #12

cdx08222028 opened this issue Feb 1, 2019 · 0 comments

Comments

@cdx08222028
Copy link

when using
gen_server:start_link({local, ?SERVER}, ?MODULE, [Port], []).
...................
{ok, LSock} = gen_tcp:listen(lists:nth(1, Port), [{active, true}),
get a problem
** exception exit: function_clause
in function inet_tcp:getserv/1
called as inet_tcp:getserv([1055])

so I tried that
{ok, LSock} = gen_tcp:listen(lists:nth(1, Port), [{active, true}]),
now it goes well.

why does it have this problem?

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

No branches or pull requests

1 participant