-
Notifications
You must be signed in to change notification settings - Fork 244
Can't get close code #38
Comments
Hi @GavinPacini, This is not normal. When a server sends a close message that includes a code, SwiftWebSocket will close the connection on the app side and fire off the Are you calling |
I'm closing this issue for now. Please feel free to reopen if you feel that the issue is related to a bug with SwiftWebSocket or have further questions. Thanks. |
Hi @tidwall, My apologies for not replying sooner. It seems that SwiftWebSocket was not reading the close frame properly. It works fine with Starscream and also works fine with an Android client. Cheers, |
Shoot. Sorry for closing the issue prematurely. I tried to reproduce the issue, but to no avail. There must be a fringe case that is being missed, at least one that Autobahn does not test for. Could you provide some information regarding what is running on the server side? |
No worries, my fault for not replying sooner, completely missed the notification! On our server we are using Ratchet PHP (http://socketo.me/ & https://github.com/ratchetphp/Ratchet). I agree, it's strange the Autobahn tests are not picking it up! On our server side, we simply close the WebSocket connection using the standard Ratchet method and we pass it certain codes. These codes appear correctly on:
And also worked on your Swift/1.2 version. I wish I could help more by explaining how Ratchet closes connections however I don't have the knowledge of Ratchet's internals! I hope you can get this fixed! 😃 |
Sweet. I think this is enough information. Hopefully it's a quick fix. Thanks a ton. |
Hi there,
Many thanks for writing such a great library!
We were using the swift 1.2 version of your library and have recently updated to swift 2.1. I am using your swift 2.1 library but when our server sends a certain close code (4000-4016) your library seems to spit out 0. Is this normal?
Any help would be greatly appreciated.
Cheers,
Gavin
The text was updated successfully, but these errors were encountered: