make WritePacket*() return errors when write queue is full (#388)

This commit is contained in:
Alessandro Ros
2023-08-26 18:09:45 +02:00
committed by GitHub
parent 9453e55f3d
commit 3bdae4ed46
14 changed files with 127 additions and 37 deletions

View File

@@ -252,10 +252,18 @@ func (e ErrServerUnexpectedFrame) Error() string {
return "received unexpected interleaved frame"
}
// ErrServerUnexpectedResponse is an error that can be returned by a client.
// ErrServerUnexpectedResponse is an error that can be returned by a server.
type ErrServerUnexpectedResponse struct{}
// Error implements the error interface.
func (e ErrServerUnexpectedResponse) Error() string {
return "received unexpected response"
}
// ErrServerWriteQueueFull is an error that can be returned by a server.
type ErrServerWriteQueueFull struct{}
// Error implements the error interface.
func (e ErrServerWriteQueueFull) Error() string {
return "write queue is full"
}