httpservice新增ManualStart开关,支持手动开始监听

This commit is contained in:
orgin
2022-10-24 11:03:32 +08:00
parent b87a78c85b
commit c3484e9d5b
2 changed files with 29 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ package network
import (
"crypto/tls"
"errors"
"github.com/duanhf2012/origin/log"
"net/http"
"time"
@@ -37,6 +38,10 @@ func (slf *HttpServer) Start() {
}
func (slf *HttpServer) startListen() error {
if slf.httpServer != nil {
return errors.New("Duplicate start not allowed")
}
var tlsCaList []tls.Certificate
var tlsConfig *tls.Config
for _, caFile := range slf.caFileList {