nodece commented on code in PR #1338:
URL: https://github.com/apache/pulsar-client-go/pull/1338#discussion_r1972860610


##########
pulsar/internal/connection.go:
##########
@@ -501,11 +511,20 @@ func (c *connection) WriteData(data Buffer) {
 
 }
 
-func (c *connection) internalWriteData(data Buffer) {
+func (c *connection) internalWriteData(ctx context.Context, data Buffer) {
        c.log.Debug("Write data: ", data.ReadableBytes())
-       if _, err := c.cnx.Write(data.ReadableSlice()); err != nil {
-               c.log.WithError(err).Warn("Failed to write on connection")
-               c.Close()
+       if ctx == nil {
+               return

Review Comment:
   lines 517-523 should be removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to