mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
proxy: optimize NewConn, avoid loop
This commit is contained in:
1 parent
40ddd1be3a
commit
6fff126e4b
6 files changed
+14
-13
No files matched your search
@@ -96,6 +96,10 @@ func NewTLSServer(s string, p proxy.Proxy) (proxy.Server, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if t.certFile == "" || t.keyFile == "" {
|
||||
return nil, errors.New("[tls] cert and key file path must be spcified")
|
||||
}
|
||||
|
||||
cert, err := stdtls.LoadX509KeyPair(t.certFile, t.keyFile)
|
||||
if err != nil {
|
||||
log.F("[tls] unable to load cert: %s, key %s", t.certFile, t.keyFile)
|
||||
|
||||
Reference in new issue
Block a user