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

@@ -256,3 +256,11 @@ type ErrClientUnhandledMethod struct {
func (e ErrClientUnhandledMethod) Error() string {
return fmt.Sprintf("unhandled method: %v", e.Method)
}
// ErrClientWriteQueueFull is an error that can be returned by a client.
type ErrClientWriteQueueFull struct{}
// Error implements the error interface.
func (e ErrClientWriteQueueFull) Error() string {
return "write queue is full"
}