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 @@ -129,7 +129,7 @@
callback func(command *pb.BaseCommand, err error)
}

type incomingCmd struct {

Check failure on line 132 in pulsar/internal/connection.go

View workflow job for this annotation

GitHub Actions / lint

type `incomingCmd` is unused (unused)
cmd *pb.BaseCommand
headersAndPayload Buffer
}
Expand Down Expand Up @@ -160,7 +160,6 @@

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 @@
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 @@
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) receivedCommand(cmd *pb.BaseCommand, headersAndPayload Buffer) {
c.incomingCmdCh <- &incomingCmd{cmd, headersAndPayload}
c.internalReceivedCommand(cmd, headersAndPayload)
}

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