Skip to content

Commit

Permalink
fix rebase issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chungthuang committed Dec 4, 2023
1 parent e291753 commit 9ba3433
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (e *StreamError) Error() string {

// DatagramTooLargeError is returned from Connection.SendDatagram if the payload is too large to be sent.
type DatagramTooLargeError struct {
CurrentMTU int64
PeerMaxDatagramFrameSize int64
}

Expand All @@ -73,3 +74,17 @@ func (e *DatagramTooLargeError) Is(target error) bool {
}

func (e *DatagramTooLargeError) Error() string { return "DATAGRAM frame too large" }

// DatagramQueuedTooLong is returned from datagramQueue.AddAndWait if a DATAGRAM cannot be sent
// after a few retries
type DatagramQueuedTooLong struct{}

func (e *DatagramQueuedTooLong) Timeout() bool { return true }
func (e *DatagramQueuedTooLong) Temporary() bool { return true }
func (e *DatagramQueuedTooLong) Error() string {
return "timeout: datagram waiting in queue for too long"
}

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.20.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.20.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.20.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.20.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.20.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.21.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.21.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.21.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.21.x)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 86 in errors.go

View workflow job for this annotation

GitHub Actions / golangci-lint (Go 1.21.x)

File is not `gofumpt`-ed (gofumpt)
func (e *DatagramQueuedTooLong) Is(target error) bool {
_, ok := target.(*DatagramQueuedTooLong)
return ok
}

0 comments on commit 9ba3433

Please sign in to comment.