projects
/
bucardo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c10a6ed
)
When clearing out the async mode, do not do so unless the state() is sane.
author
Greg Sabino Mullane
<greg@endpoint.com>
Tue, 13 Jan 2015 20:07:49 +0000
(15:07 -0500)
committer
Greg Sabino Mullane
<greg@endpoint.com>
Tue, 13 Jan 2015 20:07:49 +0000
(15:07 -0500)
Bucardo.pm
patch
|
blob
|
blame
|
history
diff --git
a/Bucardo.pm
b/Bucardo.pm
index f78d8cf109c9d8e46b463173e4e11ccf4eeadcad..cb82235e02de1014a0cfa26c207e4905bb5f1799 100644
(file)
--- a/
Bucardo.pm
+++ b/
Bucardo.pm
@@
-5469,9
+5469,13
@@
sub start_kid {
my $d = $sync->{db}{$dbname};
my $dbh = $d->{dbh};
- ## If we are async, clear it out
+
+ ## If we are async, clear it out - if the connection is still valid!
if ($d->{async_active}) {
- $dbh->pg_cancel();
+ my $state = $dbh->state;
+ if ($state eq '' or $state eq '25P01') {
+ $dbh->pg_cancel();
+ }
$d->{async_active} = 0;
}
## Seperate eval{} for the rollback as we are probably still connected to the transaction.