mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-04 18:15:21 +00:00
Use preview server when not on stable
This commit is contained in:
parent
ea0e5e880e
commit
2d411303bb
1 changed files with 3 additions and 3 deletions
|
@ -1011,9 +1011,9 @@ impl Client {
|
|||
credentials: &Credentials,
|
||||
cx: &AsyncAppContext,
|
||||
) -> Task<Result<Connection, EstablishConnectionError>> {
|
||||
let is_preview = cx.read(|cx| {
|
||||
let use_preview_server = cx.read(|cx| {
|
||||
if cx.has_global::<ReleaseChannel>() {
|
||||
*cx.global::<ReleaseChannel>() == ReleaseChannel::Preview
|
||||
*cx.global::<ReleaseChannel>() != ReleaseChannel::Stable
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
@ -1028,7 +1028,7 @@ impl Client {
|
|||
|
||||
let http = self.http.clone();
|
||||
cx.background().spawn(async move {
|
||||
let mut rpc_url = Self::get_rpc_url(http, is_preview).await?;
|
||||
let mut rpc_url = Self::get_rpc_url(http, use_preview_server).await?;
|
||||
let rpc_host = rpc_url
|
||||
.host_str()
|
||||
.zip(rpc_url.port_or_known_default())
|
||||
|
|
Loading…
Reference in a new issue