From a2223065b26206a5c05e5a6acecbbf8d0b1fe8bc Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Wed, 24 Aug 2016 08:28:48 +0100 Subject: [PATCH] Actually perform SSL handshake when we claim to. Fixes #89. --- client/connection.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)