Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
ce677196
Commit
ce677196
authored
4 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Increase lock timeout to 5 min, reset imap config on exception
parent
9b3be7dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/imapservice.js
+10
-3
10 additions, 3 deletions
exec/imapservice.js
with
10 additions
and
3 deletions
exec/imapservice.js
+
10
−
3
View file @
ce677196
...
...
@@ -1418,8 +1418,8 @@ function lock_cfg()
exit
(
0
);
if
(
js
.
termianted
)
exit
(
0
);
if
((
time
()
-
start
)
>
45
)
{
log
(
LOG_ERR
,
"
Timed out waiting
45
seconds for IMAP lo
g
.
"
);
if
((
time
()
-
start
)
>
600
)
{
log
(
LOG_ERR
,
"
Timed out waiting
600
seconds for IMAP lo
ck
.
"
);
exit
(
0
);
}
mswait
(
10
);
...
...
@@ -2982,6 +2982,7 @@ function read_cfg(sub, lck)
var
byte
;
var
asc
;
var
bit
;
var
contents
;
if
(
lck
)
lock_cfg
();
...
...
@@ -2989,7 +2990,13 @@ function read_cfg(sub, lck)
saved_config
[
sub
]
=
{
subscribed
:
false
};
cfgfile
.
rewind
();
newfile
=
JSON
.
parse
(
cfgfile
.
read
());
contents
=
cfgfile
.
read
();
try
{
newfile
=
JSON
.
parse
(
contents
);
}
catch
(
error
)
{
newfile
=
{
'
__config_epoch__
'
:
0
,
mail
:{
scan_ptr
:
0
,
subscribed
:
true
}};
}
for
(
newsub
in
newfile
)
{
if
(
newsub
==
'
__config_epoch__
'
)
{
saved_config
.
__config_epoch__
=
newfile
[
newsub
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment