summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tls-getcerts.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tls-getcerts.go b/tls-getcerts.go
index 71fb8f4..34e25e5 100644
--- a/tls-getcerts.go
+++ b/tls-getcerts.go
@@ -12,6 +12,7 @@ import (
"net/url"
"os"
"strings"
+ "time"
)
type xmppStreamsFeatures struct {
@@ -118,6 +119,10 @@ func getcert(socket string) (*x509.Certificate, error) {
if err != nil {
return nil, err
}
+ err = connRaw.SetDeadline(time.Now().Add(5 * time.Second))
+ if err != nil {
+ return nil, err
+ }
switch u.Path {
case "", "/":