Don't try to cleanup data in client when FIFO doesn't appear.
I think it was in error to go for a lock on the data and clear it — even if it's data the client had set — when we timeout waiting for the named pipe to appear. If the named pipe never appeared, then something is likely really wrong with the server anyway, and as such, we might as well expect the server to do the cleanup.
This commit is contained in:
parent
90e6da323e
commit
02a2fcbbc9
1 changed files with 1 additions and 6 deletions
|
@ -32,12 +32,7 @@ sub BeancountQuerySubmit($;$) {
|
|||
my $cnt = 0;
|
||||
while (not defined $BEANCOUNT_QUERY{fifoName}) {
|
||||
sleep 1;
|
||||
if ($cnt++ >= (5 * 60)) {
|
||||
(tied %BEANCOUNT_QUERY)->shlock;
|
||||
$BEANCOUNT_QUERY{question} = $BEANCOUNT_QUERY{format} = undef;
|
||||
(tied %BEANCOUNT_QUERY)->shunlock;
|
||||
die "Unable to initiate query to beancount server\n";
|
||||
}
|
||||
die "Unable to initiate query to beancount server\n" if ($cnt++ >= (5 * 60));
|
||||
}
|
||||
unless (-p $BEANCOUNT_QUERY{fifoName}) {
|
||||
(tied %BEANCOUNT_QUERY)->shlock;
|
||||
|
|
Loading…
Reference in a new issue