Check socket's fd for EBADF before unregister socket in event loop.

Close service's socket and uregister it from loop in __del__