This commit is contained in:
tanghuafa 2020-05-12 21:52:14 +08:00
parent 46d51313b8
commit 68fc995e8d
2 changed files with 2 additions and 1 deletions

View File

@ -143,6 +143,7 @@ func SendUdpMsg(addr string, msg string) (res string, err error) {
return
}
conn.SetReadDeadline(time.Now().Add(10 * time.Second))
buf := make([]byte, 2048)
n, errRet := conn.Read(buf)
if errRet != nil {

View File

@ -41,7 +41,7 @@ func (c *StandardCounter) Count() int32 {
}
func (c *StandardCounter) Inc(count int32) {
atomic.AddInt32(&c.count, int32(count))
atomic.AddInt32(&c.count, count)
}
func (c *StandardCounter) Dec(count int32) {