From 26a951f9706cd268e5103aee01f63fad63cd2fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Tue, 27 Jun 2023 15:37:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(serial):=E4=BF=AE=E6=AD=A3=E9=9B=AA?= =?UTF-8?q?=E8=8A=B1ID=E7=94=9F=E6=88=90=E7=AE=97=E6=B3=95=E4=B8=AD?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BF=9D=E5=AD=98=E6=9C=80=E5=90=8E=E5=BA=8F?= =?UTF-8?q?=E5=88=97=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/serial/algorithm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/serial/algorithm.go b/tools/serial/algorithm.go index 8bd08ec..91858e8 100644 --- a/tools/serial/algorithm.go +++ b/tools/serial/algorithm.go @@ -32,7 +32,7 @@ func init() { if timestamp != lastTimestamp { lastSerial = 0 } - lastSerial := lastSerial + 1 + lastSerial = lastSerial + 1 uniqueId := generateSerial(timestamp, lastSerial) SerialResponseChan <- uniqueId lastTimestamp = timestamp @@ -42,7 +42,7 @@ func init() { if timestamp != lastTimestamp { lastSerial = 0 } - lastSerial := lastSerial + 1 + lastSerial = lastSerial + 1 uniqueId := generateStringSerial(timestamp, lastSerial) StringSerialResponseChan <- uniqueId lastTimestamp = timestamp