diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-02-11 23:26:54 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-02-11 23:26:54 +0100 |
commit | 6cba91999c8b43dc979e707f7bbbaabf786f68bd (patch) | |
tree | c79cff69af5c64859b51cc83f9f05196b922e449 /peer.go | |
parent | 04ded4c63183927feba565a43fafc987dba32005 (diff) |
TUN status hack was causing spam during shutdown
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -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[:]), ) } |