IRC.Quit() now waits for RPL_WELCOME and then does a blocking write in a goroutine
This commit is contained in:
parent
3c02b00303
commit
e715b1c2c0
1 changed files with 5 additions and 2 deletions
7
irc.go
7
irc.go
|
@ -162,8 +162,11 @@ func (i *IRC) Whois(nick string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *IRC) Quit() {
|
func (i *IRC) Quit() {
|
||||||
i.Write("QUIT")
|
go func() {
|
||||||
i.conn.Close()
|
i.ready.Wait()
|
||||||
|
i.write("QUIT")
|
||||||
|
i.conn.Close()
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *IRC) Write(data string) {
|
func (i *IRC) Write(data string) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue