Skip to content

Commit a9f080d

Browse files
author
Dadoum
committedJul 11, 2022
Fix small issue with Anisette Server
1 parent 268a29b commit a9f080d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎anisette_server/app.d

+7-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ void main(string[] args) {
3737

3838
ubyte[] mid;
3939
ubyte[] otp;
40-
adi.getOneTimePassword(mid, otp);
40+
try {
41+
adi.getOneTimePassword(mid, otp);
42+
} catch {
43+
writeln("Reprovision needed.");
44+
adi.provisionDevice(rinfo);
45+
adi.getOneTimePassword(mid, otp);
46+
}
4147

4248
import std.conv;
4349
import std.json;

0 commit comments

Comments
 (0)
Please sign in to comment.