if something breaks in here it might go into an infinite loop of not closing connections
if something breaks in here it might go into an infinite loop of not closing connections