You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,11 @@ Node.js and therefor used as default in redis-parser if the hiredis parser is av
90
90
Otherwise the pure js NodeRedis parser is choosen that is almost as fast as the
91
91
hiredis parser besides some situations in which it'll be a bit slower.
92
92
93
+
## Protocol errors
94
+
95
+
To handle protocol errors (this is very unlikely to happen) gracefuly you should add the returnFatalError option, reject any still running command (they might have been processed properly but the reply is just wrong), destroy the socket and reconnect.
96
+
Otherwise a chunk might still contain partial data of a following command that was already processed properly but answered in the same chunk as the command that resulted in the protocol error.
97
+
93
98
## Contribute
94
99
95
100
The js parser is already optimized but there are likely further optimizations possible.
0 commit comments