From e1b0fae48c0b2207805bc108ab8921d0e797a834 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 14 Sep 2021 13:00:54 +0000 Subject: [PATCH] Revert "Rely on upstream timeout" This reverts commit f7f0c8c470af638fadfa838eb3cbed4b94926308. --- deps/libgphoto2 | 2 +- ui/preview.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/libgphoto2 b/deps/libgphoto2 index 0a29bc9..951b836 160000 --- a/deps/libgphoto2 +++ b/deps/libgphoto2 @@ -1 +1 @@ -Subproject commit 0a29bc9bd2e0160d9eb5b6bab3f7967793589c3c +Subproject commit 951b8364a69eb93df4aab3409a7803f1355be139 diff --git a/ui/preview.js b/ui/preview.js index 149b852..a2c6794 100644 --- a/ui/preview.js +++ b/ui/preview.js @@ -65,6 +65,9 @@ export class Preview extends Component { canvasHolder ); + // I have no idea why, but if we connect too soon, it just hangs... + await new Promise(resolve => setTimeout(resolve, 1000)); + while (this.canvasRef.current) { try { let blob = await this.props.getPreview();