cckellogg commented on a change in pull request #108: [Issue #107] 
SetWriteDeadline on connection
URL: https://github.com/apache/pulsar-client-go/pull/108#discussion_r352248292
 
 

 ##########
 File path: pulsar/internal/connection.go
 ##########
 @@ -309,7 +309,13 @@ func (c *connection) WriteData(data []byte) {
 
 func (c *connection) internalWriteData(data []byte) {
        c.log.Debug("Write data: ", len(data))
-       if _, err := c.cnx.Write(data); err != nil {
+       err := c.cnx.SetWriteDeadline(time.Now().Add(time.Second * 15))
 
 Review comment:
   Should this be set once per connection or once per write? Also, this should 
be a variable and not hardcoded so we can make it configurable in the future if 
needed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to