summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--device/noise-protocol.go1
-rw-r--r--device/send.go2
-rw-r--r--tun/tuntest/tuntest.go4
3 files changed, 3 insertions, 4 deletions
diff --git a/device/noise-protocol.go b/device/noise-protocol.go
index e89721f..0212b7d 100644
--- a/device/noise-protocol.go
+++ b/device/noise-protocol.go
@@ -20,7 +20,6 @@ import (
type handshakeState int
-// TODO(crawshaw): add commentary describing each state and the transitions
const (
handshakeZeroed = handshakeState(iota)
handshakeInitiationCreated
diff --git a/device/send.go b/device/send.go
index 6a3b30b..cb1607b 100644
--- a/device/send.go
+++ b/device/send.go
@@ -421,7 +421,7 @@ func (peer *Peer) RoutineSequentialSender() {
// This is an optimization only. It is possible for the peer to be stopped
// immediately after this check, in which case, elem will get processed.
// The timers and SendBuffer code are resilient to a few stragglers.
- // TODO(josharian): rework peer shutdown order to ensure
+ // TODO: rework peer shutdown order to ensure
// that we never accidentally keep timers alive longer than necessary.
device.PutMessageBuffer(elem.buffer)
device.PutOutboundElement(elem)
diff --git a/tun/tuntest/tuntest.go b/tun/tuntest/tuntest.go
index 92aa9d8..d89db71 100644
--- a/tun/tuntest/tuntest.go
+++ b/tun/tuntest/tuntest.go
@@ -113,7 +113,7 @@ func (t *chTun) File() *os.File { return nil }
func (t *chTun) Read(data []byte, offset int) (int, error) {
select {
case <-t.c.closed:
- return 0, io.EOF // TODO(crawshaw): what is the correct error value?
+ return 0, os.ErrClosed
case msg := <-t.c.Outbound:
return copy(data[offset:], msg), nil
}
@@ -130,7 +130,7 @@ func (t *chTun) Write(data []byte, offset int) (int, error) {
copy(msg, data[offset:])
select {
case <-t.c.closed:
- return 0, io.EOF // TODO(crawshaw): what is the correct error value?
+ return 0, os.ErrClosed
case t.c.Inbound <- msg:
return len(data) - offset, nil
}