summaryrefslogtreecommitdiffhomepage
path: root/peer.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2018-02-11 23:26:54 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2018-02-11 23:26:54 +0100
commit6cba91999c8b43dc979e707f7bbbaabf786f68bd (patch)
treec79cff69af5c64859b51cc83f9f05196b922e449 /peer.go
parent04ded4c63183927feba565a43fafc987dba32005 (diff)
TUN status hack was causing spam during shutdown
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/peer.go b/peer.go
index 1170720..5580cf6 100644
--- a/peer.go
+++ b/peer.go
@@ -54,8 +54,8 @@ type Peer struct {
handshakeDeadline Timer // complete handshake timeout
handshakeTimeout Timer // current handshake message timeout
- sendLastMinuteHandshake bool
- needAnotherKeepalive bool
+ sendLastMinuteHandshake AtomicBool
+ needAnotherKeepalive AtomicBool
}
queue struct {
@@ -170,15 +170,8 @@ func (peer *Peer) SendBuffer(buffer []byte) error {
/* Returns a short string identifier for logging
*/
func (peer *Peer) String() string {
- if peer.endpoint == nil {
- return fmt.Sprintf(
- "peer(unknown %s)",
- base64.StdEncoding.EncodeToString(peer.handshake.remoteStatic[:]),
- )
- }
return fmt.Sprintf(
- "peer(%s %s)",
- peer.endpoint.DstToString(),
+ "peer(%s)",
base64.StdEncoding.EncodeToString(peer.handshake.remoteStatic[:]),
)
}