Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for a scenario where the memcache JSON data was stored in a improper format resulting in an error shown as below which invokes an uncaught exception. This can be prevented by the given solution.
SyntaxError: Unexpected token x in JSON at position 0
at JSON.parse ()
at Socket.value (/memcached/lib/memcached.js:514:26)
at Client.rawDataReceived (/memcached/lib/memcached.js:744:51)
at Client.BufferBuffer (/memcached/lib/memcached.js:678:12)
at Socket.bowlofcurry (/memcached/lib/utils.js:126:15)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:250:12)
at readableAddChunk (_stream_readable.js:233:13)
at Socket.Readable.push (_stream_readable.js:195:10)
at TCP.onread (net.js:586:20)