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.
Parent: #382
Problem
get_socket_mode_url()creates a newreqwest::Clienton 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 reuseSlackAdapter::client.Suggested fix
Pass
&self.clientor&reqwest::Clienttoget_socket_mode_url()instead of constructing a new one. Requires minor refactor since the function is called beforeSlackAdapteris constructed in the current flow.Severity: nit — no functional impact.