From bc5498cb4b605f4e0777b6348738ace89f88f953 Mon Sep 17 00:00:00 2001 From: David Fifield Date: Tue, 28 Jan 2020 02:55:17 -0700 Subject: [PATCH] Fix the order of arguments of client copyLoop to match the call. The call was copyLoop(socks, snowflake) but the function signature was func copyLoop(WebRTC, SOCKS io.ReadWriter) { The mistake was mostly harmless, because both arguments were treated the same, except that error logs would have reported the wrong direction. --- client/lib/snowflake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/lib/snowflake.go b/client/lib/snowflake.go index 2e68e36..50070af 100644 --- a/client/lib/snowflake.go +++ b/client/lib/snowflake.go @@ -48,7 +48,7 @@ func Handler(socks SocksConnector, snowflakes SnowflakeCollector) error { // Exchanges bytes between two ReadWriters. // (In this case, between a SOCKS and WebRTC connection.) -func copyLoop(WebRTC, SOCKS io.ReadWriter) { +func copyLoop(SOCKS, WebRTC io.ReadWriter) { var wg sync.WaitGroup wg.Add(2) go func() {