Skip to content

Commit

Permalink
delete ctx nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
gunli committed Mar 7, 2025
1 parent 4a390e7 commit d005752
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pulsar/internal/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,6 @@ func (c *connection) WriteData(ctx context.Context, data Buffer) {

func (c *connection) internalWriteData(ctx context.Context, data Buffer) {
c.log.Debug("Write data: ", data.ReadableBytes())
if ctx == nil {
if _, err := c.cnx.Write(data.ReadableSlice()); err != nil {
c.log.WithError(err).Warn("Failed to write on connection")
c.Close()
}

return
}

select {
case <-ctx.Done():
Expand Down

0 comments on commit d005752

Please sign in to comment.