Commit 022f2ad
authored
Fix broken short-circuit optimization for pubsub detection (#151)
This clause never matches, because if Y is "\r", then it's not followed
by another "\r\n". It's not a bug but just a broken optimization.
resp_class(<<"*", _, "\r\n$", X, Y, "\r\n", _/binary>>)
when Y =:= $\r, X =/= $9; % Shorter than "subscribe"
Fix it by splitting the function clause in two.
Signed-off-by: Viktor Söderqvist <[email protected]>1 parent ef2922e commit 022f2ad
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
| 110 | + | |
112 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
0 commit comments