sensord: add checking code whether socket is valid or not