Actually perform SSL handshake when we claim to. Fixes #89.

This commit is contained in:
Alex Bramley 2016-08-24 08:28:48 +01:00
parent 20e4ea9b00
commit a2223065b2
1 changed files with 5 additions and 1 deletions

View File

@ -341,7 +341,11 @@ func (conn *Conn) Connect() error {
if conn.cfg.SSL {
logging.Info("irc.Connect(): Performing SSL handshake.")
conn.sock = tls.Client(conn.sock, conn.cfg.SSLConfig)
s := tls.Client(conn.sock, conn.cfg.SSLConfig)
if err := s.Handshake(); err != nil {
return err
}
conn.sock = s
}
conn.postConnect(true)