agent: set proto to http since we are logging it now

This commit is contained in:
Frank Schroeder 2017-05-31 09:41:16 +02:00
parent 361b69bb30
commit b220133785
No known key found for this signature in database
GPG key ID: 4D65C6EAEC87DECD

View file

@ -448,6 +448,7 @@ func (a *Agent) serveHTTP(l net.Listener, srv *HTTPServer) error {
// we cannot just perform a type check since the compiler won't let
// us. We might be able to use reflection but the fmt.Sprintf() hack
// works just as well.
srv.proto = "http"
if strings.Contains("*tls.listener", fmt.Sprintf("%T", l)) {
srv.proto = "https"
}