Close on disconnect event