Remove unnecessary initialisation of last

last was initialised twice (creating a shadow), the second time inside
a case statement. The second initialisation is removed, keeping the use
of last aligned to the isame style as its use other parts of the case
statement.
This commit is contained in:
Shane Howearth 2019-09-26 13:37:32 +10:00 committed by Cecylia Bocovich
parent 8bbdb3b51a
commit 01156e58eb

View file

@ -54,7 +54,6 @@ func (b *BytesSyncLogger) Log() {
case amount = <-b.OutboundChan:
b.Outbound += amount
b.OutEvents++
last := time.Now()
if time.Since(last) > time.Second*LogTimeInterval {
last = time.Now()
output()