Compare commits
2 commits
c2918ffc87
...
7e4f4caeda
Author | SHA1 | Date | |
---|---|---|---|
7e4f4caeda | |||
8effee4d09 |
2 changed files with 11 additions and 3 deletions
12
src/main.rs
12
src/main.rs
|
@ -79,7 +79,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
node = id_clone.as_str()
|
node = id_clone.as_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
shotter::take_one_screenshot(
|
match shotter::take_one_screenshot(
|
||||||
&node_clone.url,
|
&node_clone.url,
|
||||||
&node_clone.origin,
|
&node_clone.origin,
|
||||||
&id_clone,
|
&id_clone,
|
||||||
|
@ -87,7 +87,15 @@ async fn main() -> anyhow::Result<()> {
|
||||||
config.webp_quality,
|
config.webp_quality,
|
||||||
)
|
)
|
||||||
.instrument(span)
|
.instrument(span)
|
||||||
.await?;
|
.await
|
||||||
|
{
|
||||||
|
Ok(_) => {}
|
||||||
|
|
||||||
|
Err(error) => {
|
||||||
|
// FIXME: On WebSocket errors, should we just try again?
|
||||||
|
tracing::error!("Error taking screenshot: {error}");
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub async fn take_one_screenshot(
|
||||||
map.insert("Origin", origin.parse().unwrap());
|
map.insert("Origin", origin.parse().unwrap());
|
||||||
map.insert("Sec-WebSocket-Protocol", "guacamole".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) => {
|
Ok(ws) => {
|
||||||
tracing::trace!("connected to CollabVM server");
|
tracing::trace!("connected to CollabVM server");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue