Skip to content

Commit

Permalink
some minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjunpc2008 committed Nov 28, 2023
1 parent 7e7ff40 commit b1a4567
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/cbufftcpclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func cliLoopSend(conn net.Conn, ip string, port uint16, cli *CtcpCli) {
err error
ticker = time.NewTicker(1 * time.Microsecond)
)
defer ticker.Stop()

for {
bysTobeSend = dumyBys
Expand Down
1 change: 1 addition & 0 deletions net/cbufftcpserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func cliLoopSend(conn net.Conn, clientID uint64, cliIP string, cliAddr string, c
err error
ticker = time.NewTicker(time.Duration(1) * time.Microsecond)
)
defer ticker.Stop()

for {
bysTobeSend = dumyBys
Expand Down
1 change: 1 addition & 0 deletions util/kbuffthreadpool/kThread.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func threadRun(th *kThread) {
// probably because of goroutine rotation
ticker = time.NewTicker(cGetTaskGap * time.Microsecond)
)
defer ticker.Stop()

for {
if th.tp.bExit {
Expand Down

0 comments on commit b1a4567

Please sign in to comment.