tidwall / SwiftWebSocket

Fast Websockets in Swift for iOS and OSX
MIT License
1.53k stars 244 forks source link

Handle close code if it was not handled before closing #121

Open west0r opened 6 years ago

west0r commented 6 years ago

WebSocket not handle close code when connection was closed by server. I handle code on closing.

snoozemoose commented 5 years ago

@west0r I'm experiencing occasional crashes in handleCloseCodeFromFirstCloseFrameIfNeeded() on the line if frame.code == .close {, is this anything you have seen?

west0r commented 5 years ago

@snoozemoose no, my problem was related to ability to handle close code. I didn't see any crashes.

beefon commented 5 years ago

I'd love this to be merged, so far no crashes for me, but I'd like to switch from locally changed version to the upstream.