Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions engine/packages/engine/tests/common/actors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,12 @@ pub async fn ping_actor_websocket_via_guard(guard_port: u16, actor_id: &str) ->
// URL encode the actor ID since colons are not allowed in WebSocket protocol names
request.headers_mut().insert(
"Sec-WebSocket-Protocol",
format!("rivet, rivet_target.actor, rivet_actor.{}", urlencoding::encode(&actor_id))
.parse()
.unwrap(),
format!(
"rivet, rivet_target.actor, rivet_actor.{}",
urlencoding::encode(&actor_id)
)
.parse()
.unwrap(),
);

// Connect to WebSocket
Expand Down
8 changes: 4 additions & 4 deletions engine/packages/pegboard-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ use http_body_util::{BodyExt, Full};
use hyper::{Request, Response, StatusCode};
use rivet_error::*;
use rivet_guard_core::{
WebSocketHandle,
custom_serve::{CustomServeTrait, HibernationResult},
errors::{ServiceUnavailable, WebSocketServiceUnavailable},
proxy_service::{is_ws_hibernate, ResponseBody},
proxy_service::{ResponseBody, is_ws_hibernate},
request_context::RequestContext,
websocket_handle::WebSocketReceiver,
WebSocketHandle,
};
use rivet_runner_protocol as protocol;
use rivet_util::serde::HashableMap;
use std::{sync::Arc, time::Duration};
use tokio::sync::{watch, Mutex};
use tokio::sync::{Mutex, watch};
use tokio_tungstenite::tungstenite::{
protocol::frame::{coding::CloseCode, CloseFrame},
Message,
protocol::frame::{CloseFrame, coding::CloseCode},
};

use crate::shared_state::{InFlightRequestHandle, SharedState};
Expand Down
6 changes: 3 additions & 3 deletions engine/packages/pegboard-gateway/src/shared_state.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use anyhow::Result;
use gas::prelude::*;
use rivet_guard_core::errors::WebSocketServiceTimeout;
use rivet_runner_protocol::{self as protocol, versioned, PROTOCOL_VERSION};
use scc::{hash_map::Entry, HashMap};
use rivet_runner_protocol::{self as protocol, PROTOCOL_VERSION, versioned};
use scc::{HashMap, hash_map::Entry};
use std::{
ops::Deref,
sync::Arc,
Expand All @@ -12,7 +12,7 @@ use tokio::sync::{mpsc, watch};
use universalpubsub::{NextOutput, PubSub, PublishOpts, Subscriber};
use vbare::OwnedVersionedData;

use crate::{metrics, WebsocketPendingLimitReached};
use crate::{WebsocketPendingLimitReached, metrics};

const GC_INTERVAL: Duration = Duration::from_secs(15);
const TUNNEL_PING_TIMEOUT: i64 = util::duration::seconds(30);
Expand Down
9 changes: 5 additions & 4 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ pre-commit:
run: cargo fmt --all
tags: formatting
stage_fixed: true
biome-fmt:
run: pnpm fmt
tags: formatting
stage_fixed: true
# TODO: Bring this back after big dumb errors are fixed
# biome-fmt:
# run: pnpm fmt
# tags: formatting
# stage_fixed: true

Loading