Revision 346438653363 () - Diff

Link to this snippet: https://friendpaste.com/2VZvViEvWugHt4TmHFep0M
Embed:
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
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 = [],