close connection in footer