defer 빼먹음;;;
This commit is contained in:
@ -64,7 +64,7 @@ func (c *Client) Send(ld *LogDocument) {
|
|||||||
serialized, _ := json.Marshal(ld)
|
serialized, _ := json.Marshal(ld)
|
||||||
go func(serialized []byte) {
|
go func(serialized []byte) {
|
||||||
sending := atomic.AddInt32(&c.sendingCount, 1)
|
sending := atomic.AddInt32(&c.sendingCount, 1)
|
||||||
atomic.AddInt32(&c.sendingCount, -1)
|
defer atomic.AddInt32(&c.sendingCount, -1)
|
||||||
|
|
||||||
if sending > 100 {
|
if sending > 100 {
|
||||||
logger.Println("sending log bottleneck :", sending)
|
logger.Println("sending log bottleneck :", sending)
|
||||||
@ -102,7 +102,7 @@ func (c *Client) SendBulk(ds map[string]*LogDocument) {
|
|||||||
|
|
||||||
go func(contents string) {
|
go func(contents string) {
|
||||||
sending := atomic.AddInt32(&c.sendingCount, 1)
|
sending := atomic.AddInt32(&c.sendingCount, 1)
|
||||||
atomic.AddInt32(&c.sendingCount, -1)
|
defer atomic.AddInt32(&c.sendingCount, -1)
|
||||||
|
|
||||||
if sending > 100 {
|
if sending > 100 {
|
||||||
logger.Println("sending log bottleneck :", sending)
|
logger.Println("sending log bottleneck :", sending)
|
||||||
|
|||||||
Reference in New Issue
Block a user