Close all connexions
event if an error occured