Fix error result from Transport.Connect errors

This commit is contained in:
Wichert Akkerman
2019-10-12 17:46:53 +02:00
committed by Mickaël Rémond
parent 8fb3e33a1f
commit 01d78a1e5c
2 changed files with 9 additions and 5 deletions

View File

@@ -19,7 +19,10 @@ func (t *XMPPTransport) Connect() error {
var err error
t.conn, err = net.DialTimeout("tcp", t.Config.Address, time.Duration(t.Config.ConnectTimeout)*time.Second)
return err
if err != nil {
return NewConnError(err, true)
}
return nil
}
func (t XMPPTransport) DoesStartTLS() bool {