File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -418,27 +418,16 @@ func (c *connection) run() {
418
418
c .log .Debugf ("Connection run starting with request capacity=%d queued=%d" ,
419
419
cap (c .incomingRequestsCh ), len (c .incomingRequestsCh ))
420
420
421
- go func () {
422
- for {
423
- select {
424
- case <- c .closeCh :
425
- c .failLeftRequestsWhenClose ()
426
- return
427
-
428
- case req := <- c .incomingRequestsCh :
429
- if req == nil {
430
- return // TODO: this never gonna be happen
431
- }
432
- c .internalSendRequest (req )
433
- }
434
- }
435
- }()
436
-
437
421
for {
438
422
select {
439
423
case <- c .closeCh :
424
+ c .failLeftRequestsWhenClose ()
440
425
return
441
-
426
+ case req := <- c .incomingRequestsCh :
427
+ if req == nil {
428
+ return // TODO: this never gonna be happen
429
+ }
430
+ c .internalSendRequest (req )
442
431
case cmd := <- c .incomingCmdCh :
443
432
c .internalReceivedCommand (cmd .cmd , cmd .headersAndPayload )
444
433
case data := <- c .writeRequestsCh :
You can’t perform that action at this time.
0 commit comments