I have seen this several times, that temples are closed if there is a death in the houses in the vicinity. To clarify, vicinity has a variable scope here; sometimes it's a street, sometimes an agrahara or maybe a small village.
What is the reason for the closure? Which dharmasastras and/or agamas give more details on it?