Commit bee58ad7 authored by ale's avatar ale

Fix an error when no ACLs are specified

Calling strings.Split() on an empty string and a non-null separator
returns a slice with one element...
parent 882128fa
Pipeline #8484 passed with stages
in 1 minute and 42 seconds
......@@ -144,6 +144,10 @@ func main() {
if *tcpAddr != "" {
var llsrv lineproto.Handler = srv
if *sslCert != "" {
var acls []string
if *sslACLs != "" {
acls = strings.Split(*sslACLs, ",")
}
var err error
llsrv, err = newTLSServer(
llsrv,
......@@ -152,7 +156,7 @@ func main() {
Key: *sslKey,
CA: *sslCA,
},
strings.Split(*sslACLs, ","),
acls,
)
if err != nil {
log.Fatal(err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment