mileschao commented on issue #200: short read when reading frame size
URL: 
https://github.com/apache/pulsar-client-go/issues/200#issuecomment-614704664
 
 
   > @mileschao thank you for your reply. Does it impact your application? Or 
just an error message?
   
   producer will stop send message to pulsar cluster.
   and the `for loop` break.
   
[readSingleCommand](https://github.com/apache/pulsar-client-go/blob/86c3e808d0e6521757a54a6908e24d42fc099734/pulsar/internal/connection_reader.go#L43)
   
   ```go
   for {
                cmd, headersAndPayload, err := r.readSingleCommand()
                if err != nil {
                        r.cnx.log.WithError(err).Info("Error reading from 
connection")
                        r.cnx.TriggerClose()
                        break
                }
   
                // Process
                var payloadLen uint32
                if headersAndPayload != nil {
                        payloadLen = headersAndPayload.ReadableBytes()
                }
                r.cnx.log.Debug("Got command! ", cmd, " with payload size: ", 
payloadLen)
                r.cnx.receivedCommand(cmd, headersAndPayload)
        }
   ```

----------------------------------------------------------------
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