defer close listen socket