Skip to content

Commit 141e6fa

Browse files
committed
fix decoding matrix
1 parent 4c1ee93 commit 141e6fa

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

backend/pkg/transport/packet/protection/decoder.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
1717
NotEqualsKind: decodeNotEquals[int32],
1818
ErrorHandlerKind: decodeErrorHandler,
1919
TimeAccumulationKind: decodeTimeAccumulation[int32],
20-
WarningKind: decodeErrorHandler,
20+
WarningKind: decodeWarning,
2121
},
2222
FloatType: {
2323
BelowKind: decodeBelow[float32],
@@ -27,7 +27,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
2727
NotEqualsKind: decodeNotEquals[float32],
2828
ErrorHandlerKind: decodeErrorHandler,
2929
TimeAccumulationKind: decodeTimeAccumulation[float32],
30-
WarningKind: decodeErrorHandler,
30+
WarningKind: decodeWarning,
3131
},
3232
DoubleType: {
3333
BelowKind: decodeBelow[float64],
@@ -37,7 +37,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
3737
NotEqualsKind: decodeNotEquals[float64],
3838
ErrorHandlerKind: decodeErrorHandler,
3939
TimeAccumulationKind: decodeTimeAccumulation[float64],
40-
WarningKind: decodeErrorHandler,
40+
WarningKind: decodeWarning,
4141
},
4242
CharType: {
4343
BelowKind: decodeBelow[byte],
@@ -47,7 +47,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
4747
NotEqualsKind: decodeNotEquals[byte],
4848
ErrorHandlerKind: decodeErrorHandler,
4949
TimeAccumulationKind: decodeTimeAccumulation[byte],
50-
WarningKind: decodeErrorHandler,
50+
WarningKind: decodeWarning,
5151
},
5252
BoolType: {
5353
BelowKind: decodeBelow[bool],
@@ -57,7 +57,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
5757
NotEqualsKind: decodeNotEquals[bool],
5858
ErrorHandlerKind: decodeErrorHandler,
5959
TimeAccumulationKind: decodeTimeAccumulation[bool],
60-
WarningKind: decodeErrorHandler,
60+
WarningKind: decodeWarning,
6161
},
6262
ShortType: {
6363
BelowKind: decodeBelow[int16],
@@ -67,7 +67,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
6767
NotEqualsKind: decodeNotEquals[int16],
6868
ErrorHandlerKind: decodeErrorHandler,
6969
TimeAccumulationKind: decodeTimeAccumulation[int16],
70-
WarningKind: decodeErrorHandler,
70+
WarningKind: decodeWarning,
7171
},
7272
LongType: {
7373
BelowKind: decodeBelow[int64],
@@ -77,7 +77,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
7777
NotEqualsKind: decodeNotEquals[int64],
7878
ErrorHandlerKind: decodeErrorHandler,
7979
TimeAccumulationKind: decodeTimeAccumulation[int64],
80-
WarningKind: decodeErrorHandler,
80+
WarningKind: decodeWarning,
8181
},
8282
Uint8Type: {
8383
BelowKind: decodeBelow[uint8],
@@ -87,7 +87,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
8787
NotEqualsKind: decodeNotEquals[uint8],
8888
ErrorHandlerKind: decodeErrorHandler,
8989
TimeAccumulationKind: decodeTimeAccumulation[uint8],
90-
WarningKind: decodeErrorHandler,
90+
WarningKind: decodeWarning,
9191
},
9292
Uint16Type: {
9393
BelowKind: decodeBelow[uint16],
@@ -97,7 +97,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
9797
NotEqualsKind: decodeNotEquals[uint16],
9898
ErrorHandlerKind: decodeErrorHandler,
9999
TimeAccumulationKind: decodeTimeAccumulation[uint16],
100-
WarningKind: decodeErrorHandler,
100+
WarningKind: decodeWarning,
101101
},
102102
Uint32Type: {
103103
BelowKind: decodeBelow[uint32],
@@ -107,7 +107,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
107107
NotEqualsKind: decodeNotEquals[uint32],
108108
ErrorHandlerKind: decodeErrorHandler,
109109
TimeAccumulationKind: decodeTimeAccumulation[uint32],
110-
WarningKind: decodeErrorHandler,
110+
WarningKind: decodeWarning,
111111
},
112112
Uint64Type: {
113113
BelowKind: decodeBelow[uint64],
@@ -117,7 +117,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
117117
NotEqualsKind: decodeNotEquals[uint64],
118118
ErrorHandlerKind: decodeErrorHandler,
119119
TimeAccumulationKind: decodeTimeAccumulation[uint64],
120-
WarningKind: decodeErrorHandler,
120+
WarningKind: decodeWarning,
121121
},
122122
Int8Type: {
123123
BelowKind: decodeBelow[int8],
@@ -127,7 +127,7 @@ var decodingMatrix = map[Type]map[Kind]func(io.Reader, binary.ByteOrder) (Data,
127127
NotEqualsKind: decodeNotEquals[int8],
128128
ErrorHandlerKind: decodeErrorHandler,
129129
TimeAccumulationKind: decodeTimeAccumulation[int8],
130-
WarningKind: decodeErrorHandler,
130+
WarningKind: decodeWarning,
131131
},
132132
}
133133

0 commit comments

Comments
 (0)