aboutsummaryrefslogtreecommitdiff
path: root/lib/octochat/supervisor.ex
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2016-10-30 22:54:39 -0600
committerkballou <kballou@devnulllabs.io>2016-10-30 23:07:59 -0600
commit35325ce024b36672aca33f08bf61adf3570445bf (patch)
tree01cfc3f240faf82ca0f72b137fc57365f0df51e3 /lib/octochat/supervisor.ex
parent10275f7bbf7c79214a52e837294a8c16fdfaa549 (diff)
downloadoctochat-35325ce024b36672aca33f08bf61adf3570445bf.tar.gz
octochat-35325ce024b36672aca33f08bf61adf3570445bf.tar.xz
Add connection acceptorv0.1.0
This adds a basic connection acceptor that immediately closes accepted connections and beings to flesh out the supervision tree.
Diffstat (limited to 'lib/octochat/supervisor.ex')
-rw-r--r--lib/octochat/supervisor.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/octochat/supervisor.ex b/lib/octochat/supervisor.ex
index b26f4de..0c38829 100644
--- a/lib/octochat/supervisor.ex
+++ b/lib/octochat/supervisor.ex
@@ -10,7 +10,9 @@ defmodule Octochat.Supervisor do
end
def init(_) do
- children = []
+ children = [
+ worker(Task, [Octochat.Acceptor, :accept, []])
+ ]
opts = [strategy: :one_for_one]
supervise(children, opts)