CollectionFactory
CollectionFactory copied to clipboard
Passing a single "\r\n" pair crashes the socket
https://github.com/elliotchance/CollectionFactory/blob/d146492e71177e981d94c20d03692ee40e6780dd/CollectionFactory/CollectionFactory.m#L11
When NOT using CRLF as a readDelimiter, passing a single "\r\n" pair to the socket passes this test (i.e. != nil and .length == 2), but then gets trimmed off at L16/L17, resulting in an empty string @L17, resulting in an empty array @L22, causing L36 to fault.
FIX: whitespace should be trimmed (i.e. L16/L17) BEFORE this sanity check at L11.
Thanks @PusherLabs, would you be able to put in a PR for this fix?