Document that received messages are only valid until the next receive.
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ func (b *Backend) ReceiveStartupMessage() (FrontendMessage, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Receive receives a message from the frontend.
|
||||
// Receive receives a message from the frontend. The returned message is only valid until the next call to Receive.
|
||||
func (b *Backend) Receive() (FrontendMessage, error) {
|
||||
if !b.partialMsg {
|
||||
header, err := b.cr.Next(5)
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ func translateEOFtoErrUnexpectedEOF(err error) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Receive receives a message from the backend.
|
||||
// Receive receives a message from the backend. The returned message is only valid until the next call to Receive.
|
||||
func (f *Frontend) Receive() (BackendMessage, error) {
|
||||
if !f.partialMsg {
|
||||
header, err := f.cr.Next(5)
|
||||
|
||||
Reference in New Issue
Block a user