cleanup check for attached socket