Handling basic unrecoverable errors

Fix #43
This commit is contained in:
Mickael Remond
2019-06-07 15:23:23 +02:00
parent d45dd6a44a
commit 2d8d4516fd
8 changed files with 65 additions and 18 deletions

View File

@@ -43,7 +43,7 @@ func NewSession(conn net.Conn, o Config) (net.Conn, *Session, error) {
}
if !s.TlsEnabled && !o.Insecure {
return nil, nil, errors.New("failed to negotiate TLS")
return nil, nil, NewConnError(errors.New("failed to negotiate TLS session"), true)
}
// auth