Merge pull request #40 from soygul/patch-1

fix DefaultConfig.ServerName not set when func NewClient(host...) is used
This commit is contained in:
mattn 2014-11-10 12:27:46 +09:00
commit 9fe31adf02

View File

@ -168,6 +168,7 @@ func (o Options) NewClient() (*Client, error) {
if o.TLSConfig != nil {
tlsconn = tls.Client(c, o.TLSConfig)
} else {
DefaultConfig.ServerName = strings.Split(o.User, "@")[1]
tlsconn = tls.Client(c, &DefaultConfig)
}
if err = tlsconn.Handshake(); err != nil {