Skip to content

Commit 4a390e7

Browse files
committed
revert
1 parent d7c6e3d commit 4a390e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pulsar/internal/connection.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ func (c *connection) WriteData(ctx context.Context, data Buffer) {
494494
func (c *connection) internalWriteData(ctx context.Context, data Buffer) {
495495
c.log.Debug("Write data: ", data.ReadableBytes())
496496
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+
497502
return
498503
}
499504

0 commit comments

Comments
 (0)