Skip to content

Commit d005752

Browse files
committed
delete ctx nil check
1 parent 4a390e7 commit d005752

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

pulsar/internal/connection.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,6 @@ func (c *connection) WriteData(ctx context.Context, data Buffer) {
493493

494494
func (c *connection) internalWriteData(ctx context.Context, data Buffer) {
495495
c.log.Debug("Write data: ", data.ReadableBytes())
496-
if ctx == nil {
497-
if _, err := c.cnx.Write(data.ReadableSlice()); err != nil {
498-
c.log.WithError(err).Warn("Failed to write on connection")
499-
c.Close()
500-
}
501-
502-
return
503-
}
504496

505497
select {
506498
case <-ctx.Done():

0 commit comments

Comments
 (0)