mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Simplify a conditional.
This commit is contained in:
parent
256959ca65
commit
ca9ae12c38
1 changed files with 1 additions and 5 deletions
|
@ -111,11 +111,7 @@ func (handler *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
// Pass the address of client as the remote address of incoming connection
|
||||
clientIPParam := r.URL.Query().Get("client_ip")
|
||||
addr := clientAddr(clientIPParam)
|
||||
if addr == "" {
|
||||
statsChannel <- false
|
||||
} else {
|
||||
statsChannel <- true
|
||||
}
|
||||
statsChannel <- addr != ""
|
||||
or, err := pt.DialOr(&ptInfo, addr, ptMethodName)
|
||||
if err != nil {
|
||||
log.Printf("failed to connect to ORPort: %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue