From 311c612f2e7147e4b99376329c39cfb022d73113 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 17 Jul 2019 23:23:19 +0100 Subject: [PATCH] Only flag stillAlive on successful write --- src/tuntap/conn.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tuntap/conn.go b/src/tuntap/conn.go index 24d862e..0d63fde 100644 --- a/src/tuntap/conn.go +++ b/src/tuntap/conn.go @@ -113,9 +113,10 @@ func (s *tunConn) writer() error { } else { s.tun.log.Errorln(s.conn.String(), "TUN/TAP conn write error:", err) } + } else { + s.stillAlive() } util.PutBytes(b) - s.stillAlive() } } }