mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05: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
|
// Pass the address of client as the remote address of incoming connection
|
||||||
clientIPParam := r.URL.Query().Get("client_ip")
|
clientIPParam := r.URL.Query().Get("client_ip")
|
||||||
addr := clientAddr(clientIPParam)
|
addr := clientAddr(clientIPParam)
|
||||||
if addr == "" {
|
statsChannel <- addr != ""
|
||||||
statsChannel <- false
|
|
||||||
} else {
|
|
||||||
statsChannel <- true
|
|
||||||
}
|
|
||||||
or, err := pt.DialOr(&ptInfo, addr, ptMethodName)
|
or, err := pt.DialOr(&ptInfo, addr, ptMethodName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("failed to connect to ORPort: %s", err)
|
log.Printf("failed to connect to ORPort: %s", err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue