Skip to content

Crashing when recieving \n in STOMPFrameFromData:(NSData *)data #4

@mixdux

Description

@mixdux

Hello guys, I just made my first connection to websockets using your library! I just wanted to give you a heads up since the app crashes when server sends \n as a msg. I made a hotfix by adding an if clause in the aforementioned method which checks for it. App crashes exactly at

NSString *command = [[contents objectAtIndex:0] copy];

It may be a server specific, non standard msg, but I just wanted to give you a heads up, since contents array in this case doesn't have any objects (while loop removes them) and app breaks beause of "index 0 beyond bounds for empty array".
Good luck and thank you for making this great lib!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions