Skip to content

SocketManger.config #1078

Closed
Closed
@tradingstratagem

Description

@tradingstratagem

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions