mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-04-27 17:33:01 -07:00
Add IsSecure() to Transport
This commit is contained in:
committed by
Mickaël Rémond
parent
7fa4b06705
commit
8db608ccc1
@@ -39,7 +39,7 @@ func NewSession(transport Transport, o Config, state SMState) (*Session, error)
|
||||
return nil, NewConnError(s.err, true)
|
||||
}
|
||||
|
||||
if !s.TlsEnabled && !o.Insecure {
|
||||
if !transport.IsSecure() && !o.Insecure {
|
||||
err := fmt.Errorf("failed to negotiate TLS session : %s", s.err)
|
||||
return nil, NewConnError(err, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user