Close UDP socket if recovery process is shutdown