aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2018-02-04 16:46:24 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2018-02-04 16:46:24 +0100
commit9c5083bd1982f7c82f8007cbaec4da4da70e0aad (patch)
treef3c7d8075ea8d42872c1500714fd338091913012 /peer.go
parentAlign with go library layout (diff)
downloadwireguard-go-9c5083bd1982f7c82f8007cbaec4da4da70e0aad.tar.xz
wireguard-go-9c5083bd1982f7c82f8007cbaec4da4da70e0aad.zip
Removed debugging locks
Diffstat (limited to '')
-rw-r--r--peer.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/peer.go b/peer.go
index dc04811..d8bb2bf 100644
--- a/peer.go
+++ b/peer.go
@@ -4,7 +4,6 @@ import (
"encoding/base64"
"errors"
"fmt"
- "github.com/sasha-s/go-deadlock"
"sync"
"time"
)
@@ -15,7 +14,7 @@ const (
type Peer struct {
isRunning AtomicBool
- mutex deadlock.RWMutex
+ mutex sync.RWMutex
persistentKeepaliveInterval uint64
keyPairs KeyPairs
handshake Handshake
@@ -29,7 +28,7 @@ type Peer struct {
}
time struct {
- mutex deadlock.RWMutex
+ mutex sync.RWMutex
lastSend time.Time // last send message
lastHandshake time.Time // last completed handshake
nextKeepalive time.Time
@@ -66,7 +65,7 @@ type Peer struct {
}
routines struct {
- mutex deadlock.Mutex // held when stopping / starting routines
+ mutex sync.Mutex // held when stopping / starting routines
starting sync.WaitGroup // routines pending start
stopping sync.WaitGroup // routines pending stop
stop Signal // size 0, stop all go-routines in peer