Compare commits

...

2 commits

Author SHA1 Message Date
7e4f4caeda disable Nagle's algorithm 2024-09-30 06:53:52 -04:00
8effee4d09 improve error handling slightly 2024-09-30 06:53:36 -04:00
2 changed files with 11 additions and 3 deletions

View file

@ -79,7 +79,7 @@ async fn main() -> anyhow::Result<()> {
node = id_clone.as_str()
);
shotter::take_one_screenshot(
match shotter::take_one_screenshot(
&node_clone.url,
&node_clone.origin,
&id_clone,
@ -87,7 +87,15 @@ async fn main() -> anyhow::Result<()> {
config.webp_quality,
)
.instrument(span)
.await?;
.await
{
Ok(_) => {}
Err(error) => {
// FIXME: On WebSocket errors, should we just try again?
tracing::error!("Error taking screenshot: {error}");
}
};
}
Ok(())

View file

@ -30,7 +30,7 @@ pub async fn take_one_screenshot(
map.insert("Origin", origin.parse().unwrap());
map.insert("Sec-WebSocket-Protocol", "guacamole".parse().unwrap());
match tokio_tungstenite::connect_async(req).await {
match tokio_tungstenite::connect_async_with_config(req, None, true).await {
Ok(ws) => {
tracing::trace!("connected to CollabVM server");