Pull reconnect code out of main(), add missing params and error handling
This commit is contained in:
parent
6e223c172f
commit
ae78ac5017
2 changed files with 38 additions and 27 deletions
|
@ -85,7 +85,8 @@ func handleWS(ws *websocket.Conn) {
|
|||
irc.Password = data.Password
|
||||
irc.Realname = data.Realname
|
||||
|
||||
if err := irc.Connect(data.Server); err != nil {
|
||||
err := irc.Connect(data.Server)
|
||||
if err != nil {
|
||||
session.sendError(err, irc.Host)
|
||||
log.Println(err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue