diff --git a/client/connection.go b/client/connection.go index 4f2a6b7..c2f3446 100644 --- a/client/connection.go +++ b/client/connection.go @@ -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)