File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -411,26 +411,16 @@ func (c *connection) run() {
411411 c .log .Debugf ("Connection run starting with request capacity=%d queued=%d" ,
412412 cap (c .incomingRequestsCh ), len (c .incomingRequestsCh ))
413413
414- go func () {
415- for {
416- select {
417- case <- c .closeCh :
418- c .failLeftRequestsWhenClose ()
419- return
420-
421- case req := <- c .incomingRequestsCh :
422- if req == nil {
423- return // TODO: this never gonna be happen
424- }
425- c .internalSendRequest (req )
426- }
427- }
428- }()
429-
430414 for {
431415 select {
432416 case <- c .closeCh :
417+ c .failLeftRequestsWhenClose ()
433418 return
419+ case req := <- c .incomingRequestsCh :
420+ if req == nil {
421+ return // TODO: this never gonna be happen
422+ }
423+ c .internalSendRequest (req )
434424 case data := <- c .writeRequestsCh :
435425 if data == nil {
436426 return
You can’t perform that action at this time.
0 commit comments