patch potential race condition requesting topic before upstream has connected
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
62487dd437
commit
cc22ee33ae
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user