Commit 57d4b0b5 authored by David Fifield's avatar David Fifield
Browse files

Use lowercase variable names in copyLoop.

parent bc5498cb
......@@ -48,17 +48,17 @@ func Handler(socks SocksConnector, snowflakes SnowflakeCollector) error {
// Exchanges bytes between two ReadWriters.
// (In this case, between a SOCKS and WebRTC connection.)
func copyLoop(SOCKS, WebRTC io.ReadWriter) {
func copyLoop(socks, webRTC io.ReadWriter) {
var wg sync.WaitGroup
wg.Add(2)
go func() {
if _, err := io.Copy(SOCKS, WebRTC); err != nil {
if _, err := io.Copy(socks, webRTC); err != nil {
log.Printf("copying WebRTC to SOCKS resulted in error: %v", err)
}
wg.Done()
}()
go func() {
if _, err := io.Copy(WebRTC, SOCKS); err != nil {
if _, err := io.Copy(webRTC, socks); err != nil {
log.Printf("copying SOCKS to WebRTC resulted in error: %v", err)
}
wg.Done()
......
......@@ -21,17 +21,17 @@ var ptMethodName = "snowflake"
var ptInfo pt.ServerInfo
var logFile *os.File
func copyLoop(WebRTC, ORPort net.Conn) {
func copyLoop(webRTC, orPort net.Conn) {
var wg sync.WaitGroup
wg.Add(2)
go func() {
if _, err := io.Copy(ORPort, WebRTC); err != nil {
if _, err := io.Copy(orPort, webRTC); err != nil {
log.Printf("copy WebRTC to ORPort error in copyLoop: %v", err)
}
wg.Done()
}()
go func() {
if _, err := io.Copy(WebRTC, ORPort); err != nil {
if _, err := io.Copy(webRTC, orPort); err != nil {
log.Printf("copy ORPort to WebRTC error in copyLoop: %v", err)
}
wg.Done()
......
Markdown is supported
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