Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketManger.config #1078

Closed
tradingstratagem opened this issue Aug 30, 2018 · 2 comments
Closed

SocketManger.config #1078

tradingstratagem opened this issue Aug 30, 2018 · 2 comments
Labels

Comments

@tradingstratagem
Copy link

Hello,

I think there is a small issue when the SocketManager.config is modified.

Here is my test, I initialise the SocketManager as follows:
self.socketManager = SocketManager(socketURL: URL(string: "https://example.com")!, config: [ .log(false), .compress ])

Then I update the config and add the connectParams:
self.socketManager?.config = [ .connectParams(connectParameters) ]

At this point when i Try to connect, the SocketManager removes the secure flag and tries to connect to "http://example.com" rather than "https://example.com"

I have to explicit pass the secure(true) param when modifying the config like this:
self.socketManager?.config = [ .secure(true), .connectParams(connectParameters) ]

I think this is probably a bug because if I pass the connectParams on the initialisation and I don't change the config it works without passing secure(true).

@nuclearace nuclearace added the bug label Aug 30, 2018
@nuclearace
Copy link
Member

Yeah this looks like a bug.

@tradingstratagem
Copy link
Author

Wow, fixed very fast :D

@nuclearace nuclearace mentioned this issue Aug 30, 2018
nuclearace added a commit that referenced this issue Oct 4, 2018
* development:
  update changelog and bump pod version
  check for 200 status code when polling #857
  update xcode versino
  set the right URL in websocket creation
  fix cookies import when create the websocket
  Be sure to keep secure config even if config is changed. Fix #1078
  Don't need to write DispatchTime
  use while let instead of while and if let
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants