derp: more misc cleanups

And add an explicit derphttp.Client.Connect in the test now that it's
done lazily.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2020-02-18 10:08:51 -08:00
parent e06ca40650
commit 619697063e
2 changed files with 25 additions and 17 deletions
+4
View File
@@ -5,6 +5,7 @@
package derphttp
import (
"context"
crand "crypto/rand"
"crypto/tls"
"net"
@@ -77,6 +78,9 @@ func TestSendRecv(t *testing.T) {
if err != nil {
t.Fatalf("client %d: %v", i, err)
}
if err := c.Connect(context.Background()); err != nil {
t.Fatalf("client %d Connect: %v", i, err)
}
clients = append(clients, c)
recvChs = append(recvChs, make(chan []byte))