Remove ev before closing server socket