Fixes a few logical issues and order of op
This commit is contained in:
parent
bef32b7ff5
commit
6c52299c7a
|
@ -833,12 +833,12 @@ func (c *client) Visit(url string) {
|
||||||
}
|
}
|
||||||
case "gemini":
|
case "gemini":
|
||||||
capsule, err := gemini.Visit(u.Host, u.Port, u.Resource, &c.Certs)
|
capsule, err := gemini.Visit(u.Host, u.Port, u.Resource, &c.Certs)
|
||||||
go saveConfig()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.SetMessage(err.Error(), true)
|
c.SetMessage(err.Error(), true)
|
||||||
c.DrawMessage()
|
c.DrawMessage()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
go saveConfig()
|
||||||
switch capsule.Status {
|
switch capsule.Status {
|
||||||
case 1:
|
case 1:
|
||||||
c.search("", u.Full, capsule.Content)
|
c.search("", u.Full, capsule.Content)
|
||||||
|
|
|
@ -113,7 +113,7 @@ func Retrieve(host, port, resource string, td *TofuDigest) (string, error) {
|
||||||
// the hostname on the certificate(s) from the server
|
// the hostname on the certificate(s) from the server
|
||||||
// is the hostname we have requested
|
// is the hostname we have requested
|
||||||
connState := conn.ConnectionState()
|
connState := conn.ConnectionState()
|
||||||
if len(connState.PeerCertificates) < 0 {
|
if len(connState.PeerCertificates) < 1 {
|
||||||
return "", fmt.Errorf("Insecure, no certificates offered by server")
|
return "", fmt.Errorf("Insecure, no certificates offered by server")
|
||||||
}
|
}
|
||||||
hostCertExists := td.Exists(host)
|
hostCertExists := td.Exists(host)
|
||||||
|
|
Loading…
Reference in New Issue