diff --git a/server.go b/server.go index 7068119..4ecd93c 100644 --- a/server.go +++ b/server.go @@ -112,9 +112,6 @@ func (s *Server) RunWorker() { func (s *Server) upstreamWorker() { - // Initiate connection - s.upstream = s.upstreamLauncher.Connect() - // Read loop for { select { @@ -208,6 +205,7 @@ func (s *Server) handleCommand(command string, args []string) { s.clientRegistered = true // Spawn upstream connection + s.upstream = s.upstreamLauncher.Connect() go s.upstreamWorker() // Tell the user that they themselves joined the chat channel