2
0

Document that received messages are only valid until the next receive.

This commit is contained in:
Jack Christensen
2020-09-05 11:29:10 -05:00
parent 08088ecf9a
commit fede0ce5d6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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)