Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Yoann HOUPERT
hublot
Commits
8f4d0dc9
Commit
8f4d0dc9
authored
Oct 19, 2017
by
Yoann HOUPERT
Browse files
replace recursive timeout init recommendation by interval
parent
3cc24a3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
client/robot/robot.js
client/robot/robot.js
+5
-6
No files found.
client/robot/robot.js
View file @
8f4d0dc9
...
...
@@ -144,13 +144,12 @@ robot = {
robot
.
checkDisconnect
();
};
function
recoStartRetry
()
{
if
(
!
robotLib
.
reco
.
start
(
room
))
{
setTimeout
(
recoStartRetry
,
8000
);
const
recoStartRetry
=
()
=>
{
if
(
robotLib
.
reco
.
start
(
room
))
{
clearInterval
(
robot
.
recoInterval
);
}
}
// If start fails, schedule retry at fixed interval until success
recoStartRetry
();
};
robot
.
recoInterval
=
setInterval
(
recoStartRetry
,
8000
);
setInterval
(
()
=>
robotLib
.
reco
.
getOnlineReco
(
room
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment