From 2b06810bd7d6af96deda74b103b2a76dde6822bd Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 28 Jan 2017 00:04:04 -0600 Subject: [PATCH] Fix issue with keep alive caused by nil channel --- servermanager.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/servermanager.go b/servermanager.go index 0ab80f5..850dee9 100644 --- a/servermanager.go +++ b/servermanager.go @@ -35,7 +35,7 @@ type ServerManager struct { name string ports []int in chan serverManagerEvent - done chan interface{} + done chan int connStatus chan ConnStatus lastKeepAliveTime time.Time server ServerHandler @@ -47,7 +47,8 @@ func NewServerManager(name string, server ServerHandler, settings Settings) *Ser sm.name = name sm.ports = settings.Servers[name].Ports sm.in = make(chan serverManagerEvent) - sm.done = make(chan interface{}) + sm.done = make(chan int) + sm.connStatus = make(chan ConnStatus) sm.server = server sm.lastKeepAliveTime = time.Now() @@ -82,7 +83,7 @@ func (me *ServerManager) Serve() { ticker.Stop() // notify done - me.done <- 42 + me.done <- 0 } /*