2VZvViEvWugHt4TmHFep0M changeset

Changeset346438653363 (b)
ParentNone (a)
ab
0+diff --git a/src/couchdb/couch_api_wrap.erl b/src/couchdb/couch_api_wrap.erl
0+index 5d9c673..aa481c7 100644
0+--- a/src/couchdb/couch_api_wrap.erl
0++++ b/src/couchdb/couch_api_wrap.erl
0+@@ -104,7 +104,7 @@ db_close(#httpdb{httpc_pool = Pool}) ->
0+     unlink(Pool),
0+     ok = couch_httpc_pool:stop(Pool);
0+ db_close(DbName) ->
0+-    couch_db:close(DbName).
0++    catch couch_db:close(DbName).
0+ 
0+ 
0+ get_db_info(#httpdb{} = Db) ->
0+diff --git a/src/couchdb/couch_replicator.erl b/src/couchdb/couch_replicator.erl
0+index aca2fca..c559c91 100644
0+--- a/src/couchdb/couch_replicator.erl
0++++ b/src/couchdb/couch_replicator.erl
0+@@ -478,7 +478,9 @@ terminate(Reason, State) ->
0+ terminate_cleanup(State) ->
0+     couch_task_status:update("Finishing"),
0+     stop_db_compaction_notifier(State#rep_state.source_db_compaction_notifier),
0+-    stop_db_compaction_notifier(State#rep_state.target_db_compaction_notifier).
0++    stop_db_compaction_notifier(State#rep_state.target_db_compaction_notifier),
0++    couch_api_wrap:db_close(State#rep_state.source),
0++    couch_api_wrap:db_close(State#rep_state.target).
0+ 
0+ 
0+ do_last_checkpoint(#rep_state{seqs_in_progress = [],
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- Revision None
+++ Revision 346438653363
@@ -0,0 +1,28 @@
+diff --git a/src/couchdb/couch_api_wrap.erl b/src/couchdb/couch_api_wrap.erl
+index 5d9c673..aa481c7 100644
+--- a/src/couchdb/couch_api_wrap.erl
++++ b/src/couchdb/couch_api_wrap.erl
+@@ -104,7 +104,7 @@ db_close(#httpdb{httpc_pool = Pool}) ->
+ unlink(Pool),
+ ok = couch_httpc_pool:stop(Pool);
+ db_close(DbName) ->
+- couch_db:close(DbName).
++ catch couch_db:close(DbName).
+
+
+ get_db_info(#httpdb{} = Db) ->
+diff --git a/src/couchdb/couch_replicator.erl b/src/couchdb/couch_replicator.erl
+index aca2fca..c559c91 100644
+--- a/src/couchdb/couch_replicator.erl
++++ b/src/couchdb/couch_replicator.erl
+@@ -478,7 +478,9 @@ terminate(Reason, State) ->
+ terminate_cleanup(State) ->
+ couch_task_status:update("Finishing"),
+ stop_db_compaction_notifier(State#rep_state.source_db_compaction_notifier),
+- stop_db_compaction_notifier(State#rep_state.target_db_compaction_notifier).
++ stop_db_compaction_notifier(State#rep_state.target_db_compaction_notifier),
++ couch_api_wrap:db_close(State#rep_state.source),
++ couch_api_wrap:db_close(State#rep_state.target).
+
+
+ do_last_checkpoint(#rep_state{seqs_in_progress = [],