Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions pulsar/internal/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ type connection struct {

incomingRequestsWG sync.WaitGroup
incomingRequestsCh chan *request
incomingCmdCh chan *incomingCmd
closeCh chan struct{}
readyCh chan struct{}
writeRequestsCh chan Buffer
Expand Down Expand Up @@ -209,7 +208,6 @@ func newConnection(opts connectionOptions) *connection {
closeCh: make(chan struct{}),
readyCh: make(chan struct{}),
incomingRequestsCh: make(chan *request, 10),
incomingCmdCh: make(chan *incomingCmd, 10),

// This channel is used to pass data from producers to the connection
// go routine. It can become contended or blocking if we have multiple
Expand Down Expand Up @@ -438,9 +436,6 @@ func (c *connection) run() {
select {
case <-c.closeCh:
return

case cmd := <-c.incomingCmdCh:
c.internalReceivedCommand(cmd.cmd, cmd.headersAndPayload)
case data := <-c.writeRequestsCh:
if data == nil {
return
Expand Down Expand Up @@ -534,7 +529,7 @@ func (c *connection) writeCommand(cmd *pb.BaseCommand) {
}

func (c *connection) receivedCommand(cmd *pb.BaseCommand, headersAndPayload Buffer) {
c.incomingCmdCh <- &incomingCmd{cmd, headersAndPayload}
c.internalReceivedCommand(cmd, headersAndPayload)
Comment thread
gunli marked this conversation as resolved.
Outdated
}
Comment thread
gunli marked this conversation as resolved.
Outdated

func (c *connection) internalReceivedCommand(cmd *pb.BaseCommand, headersAndPayload Buffer) {
Expand Down