Simplify relay

This commit is contained in:
9seconds
2021-03-29 10:37:09 +03:00
parent 3992054560
commit 4c3f42e264
3 changed files with 23 additions and 12 deletions
+1 -1
View File
@@ -29,11 +29,11 @@ func (c *Conn) Read(p []byte) (int, error) {
}
switch rec.Type { // nolint: exhaustive
case record.TypeChangeCipherSpec:
case record.TypeApplicationData:
rec.Payload.WriteTo(&c.readBuffer) // nolint: errcheck
return c.readBuffer.Read(p)
case record.TypeChangeCipherSpec:
default:
return 0, fmt.Errorf("unsupported record type %v", rec.Type)
}