mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Remove erroneous logging around pt.*Error calls.
These functions are called for their side effect of sending a PT error message on stdout; they also return a representation of the error message as an error object for the caller to use if it wishes. These functions *always* return a non-nil error object; it is not something to be logged, any more than the return value of errors.New is. The mistaken logging was added in https://bugs.torproject.org/31794b26c7a7a73
3ec9dd19fa
ed3d42e1ec
This commit is contained in:
parent
37aaaffa15
commit
5ff75e1034
3 changed files with 7 additions and 21 deletions
|
@ -282,9 +282,7 @@ func main() {
|
|||
servers := make([]*http.Server, 0)
|
||||
for _, bindaddr := range ptInfo.Bindaddrs {
|
||||
if bindaddr.MethodName != ptMethodName {
|
||||
if err = pt.SmethodError(bindaddr.MethodName, "no such method"); err != nil {
|
||||
log.Printf("pt.SmethodError returned error: %v", err)
|
||||
}
|
||||
pt.SmethodError(bindaddr.MethodName, "no such method")
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -296,9 +294,7 @@ func main() {
|
|||
lnHTTP01, err = net.ListenTCP("tcp", &addr)
|
||||
if err != nil {
|
||||
log.Printf("error opening HTTP-01 ACME listener: %s", err)
|
||||
if inerr := pt.SmethodError(bindaddr.MethodName, "HTTP-01 ACME listener: "+err.Error()); inerr != nil {
|
||||
log.Printf("pt.SmethodError returned error: %v", inerr)
|
||||
}
|
||||
pt.SmethodError(bindaddr.MethodName, "HTTP-01 ACME listener: "+err.Error())
|
||||
continue
|
||||
}
|
||||
server := &http.Server{
|
||||
|
@ -326,9 +322,7 @@ func main() {
|
|||
}
|
||||
if err != nil {
|
||||
log.Printf("error opening listener: %s", err)
|
||||
if inerr := pt.SmethodError(bindaddr.MethodName, err.Error()); inerr != nil {
|
||||
log.Printf("pt.SmethodError returned error: %v", inerr)
|
||||
}
|
||||
pt.SmethodError(bindaddr.MethodName, err.Error())
|
||||
continue
|
||||
}
|
||||
pt.SmethodArgs(bindaddr.MethodName, bindaddr.Addr, args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue