use PROTOCOL_VIOLATION for invalid RETIRE_CONNECTION_ID frames

This commit is contained in:
Marten Seemann 2020-07-08 12:24:15 +07:00
parent 25db2166dd
commit 33fc464bac
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ func (m *connIDGenerator) Retire(seq uint64, sentWithDestConnID protocol.Connect
return nil
}
if connID.Equal(sentWithDestConnID) {
return qerr.NewError(qerr.FrameEncodingError, fmt.Sprintf("tried to retire connection ID %d (%s), which was used as the Destination Connection ID on this packet", seq, connID))
return qerr.NewError(qerr.ProtocolViolation, fmt.Sprintf("tried to retire connection ID %d (%s), which was used as the Destination Connection ID on this packet", seq, connID))
}
m.retireConnectionID(connID)
delete(m.activeSrcConnIDs, seq)