Only flag stillAlive on successful write

This commit is contained in:
Neil Alexander 2019-07-17 23:23:19 +01:00
parent 307b24d8cb
commit 311c612f2e
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -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()
}
}
}