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

Server listens to a new sock after a client joins #53

Closed
slashmili opened this issue Oct 18, 2019 · 1 comment
Closed

Server listens to a new sock after a client joins #53

slashmili opened this issue Oct 18, 2019 · 1 comment

Comments

@slashmili
Copy link
Contributor

slashmili commented Oct 18, 2019

I have a strange issue, I don't know if it's only for me or you also have the same problem but haven't noticed it.

Screenshot 2019-10-19 at 00 40 01

  1. I run server using
elixir run.exs unix 0 dev
  1. Start an iex console and copy paste the example in README
{:ok, socket} = 
...
data = :erlang.term_to_binary(request)
:ok = :gen_tcp.send(socket, data)
{:ok, response} = :gen_tcp.recv(socket, 0)
:erlang.binary_to_term(response)
  1. By this time I see in the output of my server that it listens to a new sock file.

  2. I did try to to connect to the old sock but it's not available anymore

Interactive Elixir (1.9.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> {:ok, socket} = :gen_tcp.connect({:local, '/var/folders/h8/xlzsrqld6rldv_l03dsn60x80000gn/T/elixir-sense-1571438027826601476.sock'}, 0, [:binary, active: false, packet: 4])
** (MatchError) no match of right hand side value: {:error, :econnrefused}
    (stdlib) erl_eval.erl:453: :erl_eval.expr/5
    (iex) lib/iex/evaluator.ex:257: IEx.Evaluator.handle_eval/5
    (iex) lib/iex/evaluator.ex:237: IEx.Evaluator.do_eval/3
    (iex) lib/iex/evaluator.ex:215: IEx.Evaluator.eval/3
    (iex) lib/iex/evaluator.ex:103: IEx.Evaluator.loop/1
    (iex) lib/iex/evaluator.ex:27: IEx.Evaluator.init/4
@lukaszsamson
Copy link
Collaborator

Closing as the server is removed (see #135)

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

2 participants