Skip to content

Commit

Permalink
쓰레드로컬의 데이터 비우는 조건 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
shin-mallang committed Oct 12, 2023
1 parent 8864d98 commit ad8eeae
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public static void bindResource(DataSource key, Connection value) {
public static Connection unbindResource(DataSource key) {
Map<DataSource, Connection> dataSourceConnectionMap = resources.get();
Connection remove = dataSourceConnectionMap.remove(key);
resources.remove();
if (dataSourceConnectionMap.isEmpty()) {
resources.remove();
}
return remove;
}
}

0 comments on commit ad8eeae

Please sign in to comment.