summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichal Muskala <michal@muskala.eu>2016-05-13 20:52:24 +0200
committerMichal Muskala <michal@muskala.eu>2016-05-13 21:37:26 +0200
commitd30f51fa655b256d01c84e1e7a2ea49fc39efb2d (patch)
tree425692b1bd46dae8efe168959719c69cdffecf20 /lib
parentMonitor owner of the connection (diff)
Start connections as temporary children
Since the default API offered by ExIRC does not name connection the way to access them is via a PID. Having the supervisor be a :transient one means that in case the connection would die, it would be restarted by the supervisor. But since we only ever knew the PID, we have no way to refer back to this newly restarted process and thus a zombie process is roaming the VM. Closes #49
Diffstat (limited to 'lib')
-rw-r--r--lib/exirc/exirc.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/exirc/exirc.ex b/lib/exirc/exirc.ex
index 72be33c..b32af54 100644
--- a/lib/exirc/exirc.ex
+++ b/lib/exirc/exirc.ex
@@ -60,7 +60,7 @@ defmodule ExIrc do
@spec init(any) :: {:ok, pid} | {:error, term}
def init(_) do
children = [
- worker(ExIrc.Client, [], restart: :transient)
+ worker(ExIrc.Client, [], restart: :temporary)
]
supervise children, strategy: :simple_one_for_one
end