Skip to content

Commit

Permalink
Fix build issue and vet issue
Browse files Browse the repository at this point in the history
  • Loading branch information
brad-defined committed Nov 21, 2023
1 parent a03c16f commit e722e1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/handshakes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ func TestRehandshakingRelays(t *testing.T) {

func TestRehandshakingRelaysPrimary(t *testing.T) {
// This test is the same as TestRehandshakingRelays but one of the terminal types is a primary swap winner
ca, _, caKey, _ := newTestCaCert(time.Now(), time.Now().Add(10*time.Minute), []*net.IPNet{}, []*net.IPNet{}, []string{})
ca, _, caKey, _ := NewTestCaCert(time.Now(), time.Now().Add(10*time.Minute), []*net.IPNet{}, []*net.IPNet{}, []string{})
myControl, myVpnIpNet, _, _ := newSimpleServer(ca, caKey, "me ", net.IP{10, 0, 0, 128}, m{"relay": m{"use_relays": true}})
relayControl, relayVpnIpNet, relayUdpAddr, relayConfig := newSimpleServer(ca, caKey, "relay ", net.IP{10, 0, 0, 1}, m{"relay": m{"am_relay": true}})
theirControl, theirVpnIpNet, theirUdpAddr, _ := newSimpleServer(ca, caKey, "them ", net.IP{10, 0, 0, 2}, m{"relay": m{"use_relays": true}})
Expand Down Expand Up @@ -642,7 +642,7 @@ func TestRehandshakingRelaysPrimary(t *testing.T) {
// When I update the certificate for the relay, both me and them will have 2 host infos for the relay,
// and the main host infos will not have any relay state to handle the me<->relay<->them tunnel.
r.Log("Renew relay certificate and spin until me and them sees it")
_, _, myNextPrivKey, myNextPEM := newTestCert(ca, caKey, "relay", time.Now(), time.Now().Add(5*time.Minute), relayVpnIpNet, nil, []string{"new group"})
_, _, myNextPrivKey, myNextPEM := NewTestCert(ca, caKey, "relay", time.Now(), time.Now().Add(5*time.Minute), relayVpnIpNet, nil, []string{"new group"})

caB, err := ca.MarshalToPEM()
if err != nil {
Expand Down
6 changes: 4 additions & 2 deletions examples/go_service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pki:
for {
conn, err := ln.Accept()
if err != nil {
return err
log.Printf("accept error: %s", err)
break
}
defer conn.Close()

Expand All @@ -86,7 +87,8 @@ pki:
}

if err := scanner.Err(); err != nil {
return err
log.Printf("scanner error: %s", err)
break
}
}

Expand Down

0 comments on commit e722e1e

Please sign in to comment.