Remove goroutines that lead to possible races
This commit is contained in:
parent
cfeaaad88f
commit
5c79c4235e
|
@ -323,7 +323,7 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) {
|
||||||
case "LIST":
|
case "LIST":
|
||||||
daemon.SendList(client, cols)
|
daemon.SendList(client, cols)
|
||||||
case "LUSERS":
|
case "LUSERS":
|
||||||
go daemon.SendLusers(client)
|
daemon.SendLusers(client)
|
||||||
case "MODE":
|
case "MODE":
|
||||||
if len(cols) == 1 || len(cols[1]) < 1 {
|
if len(cols) == 1 || len(cols[1]) < 1 {
|
||||||
client.ReplyNotEnoughParameters("MODE")
|
client.ReplyNotEnoughParameters("MODE")
|
||||||
|
@ -436,7 +436,7 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) {
|
||||||
}
|
}
|
||||||
cols := strings.Split(cols[1], " ")
|
cols := strings.Split(cols[1], " ")
|
||||||
nicknames := strings.Split(cols[len(cols)-1], ",")
|
nicknames := strings.Split(cols[len(cols)-1], ",")
|
||||||
go daemon.SendWhois(client, nicknames)
|
daemon.SendWhois(client, nicknames)
|
||||||
default:
|
default:
|
||||||
client.ReplyNicknamed("421", command, "Unknown command")
|
client.ReplyNicknamed("421", command, "Unknown command")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue