Commit 8378f859 authored by David Fifield's avatar David Fifield
Browse files

Remove a level of indentation in server.

parent d8411816
......@@ -256,26 +256,26 @@ func main() {
listeners := make([]net.Listener, 0)
for _, bindaddr := range ptInfo.Bindaddrs {
switch bindaddr.MethodName {
case ptMethodName:
var ln net.Listener
args := pt.Args{}
if disableTLS {
args.Add("tls", "no")
ln, err = startListener("tcp", bindaddr.Addr)
} else {
args.Add("tls", "yes")
ln, err = startListenerTLS("tcp", bindaddr.Addr, certFilename, keyFilename)
}
if err != nil {
pt.SmethodError(bindaddr.MethodName, err.Error())
break
}
pt.SmethodArgs(bindaddr.MethodName, ln.Addr(), args)
listeners = append(listeners, ln)
default:
if bindaddr.MethodName != ptMethodName {
pt.SmethodError(bindaddr.MethodName, "no such method")
continue
}
var ln net.Listener
args := pt.Args{}
if disableTLS {
args.Add("tls", "no")
ln, err = startListener("tcp", bindaddr.Addr)
} else {
args.Add("tls", "yes")
ln, err = startListenerTLS("tcp", bindaddr.Addr, certFilename, keyFilename)
}
if err != nil {
pt.SmethodError(bindaddr.MethodName, err.Error())
break
}
pt.SmethodArgs(bindaddr.MethodName, ln.Addr(), args)
listeners = append(listeners, ln)
}
pt.SmethodsDone()
......
Supports Markdown
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