Avoid to close the already closed socket.
Merge pull request #55 from masanori-yoshimoto/bug-fix/avoid-double-close-socket

Avoid to close the already closed socket.