Skip to content

Slack: get_socket_mode_url creates new reqwest::Client per reconnect #386

@thepagent

Description

@thepagent

Parent: #382

Problem

get_socket_mode_url() creates a new reqwest::Client on every call. Since Socket Mode reconnects are rare (server-initiated disconnect, network blip), this is not a real performance issue, but it would be cleaner to reuse SlackAdapter::client.

Suggested fix

Pass &self.client or &reqwest::Client to get_socket_mode_url() instead of constructing a new one. Requires minor refactor since the function is called before SlackAdapter is constructed in the current flow.

Severity: nit — no functional impact.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions