-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Oh no, I made it worse 😱
It looks like my PR that was supposed to get rid of implementation leaks introduced some new ones.
I should have tested my changes thoroughly with our production code...
It looks like my GenServer that calls NodeJS.call(..) is sometimes getting back the messages sent by Port:
{:ok, [message: {#Port<0.2131>, {:data, {:eol, []}}}, module: NodeJS.Worker, name: #PID<0.1656.0>]}Also, I'm still getting the timeout messages in my mailbox:
** (FunctionClauseError) no function clause matching in CallerGenServer.handle_info/2
(foo 1.1.0) lib/foo/callerGenServer.ex:91: CallerGenServer.handle_info({#Reference<0.221168823.2908225537.225316>, {:error, :timeout}}, nil)
(stdlib 3.13) gen_server.erl:680: :gen_server.try_dispatch/4
(stdlib 3.13) gen_server.erl:756: :gen_server.handle_msg/6
(stdlib 3.13) proc_lib.erl:226: :proc_lib.init_p_do_apply/3I suspect some race condition with timeouts...
Also, we might need to add a wrapper GenServer that catches all these messages such that the caller is truly isolated from the worker process.
Unfortunately I wont have much time to investigate exactly when and how it happens, as I'm soon leaving for vacations.
Otherwise I would solve it myself and contribute the solution.
I feel obliged to fix it, but I won't have the time (earliest after ca. 4 weeks).
I'm terribly sorry about that.