Fix Formats and Send error to main goroutine on Disconnect
This commit is contained in:
parent
9bdf790e25
commit
95288a16c5
2
irc.go
2
irc.go
@ -13,6 +13,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -232,6 +233,7 @@ func (irc *Connection) Disconnect() {
|
|||||||
irc.netsock.Close()
|
irc.netsock.Close()
|
||||||
irc.netsock = nil
|
irc.netsock = nil
|
||||||
}
|
}
|
||||||
|
irc.Error <- errors.New("Disconnect Called")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (irc *Connection) Reconnect() error {
|
func (irc *Connection) Reconnect() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user