refactor socket close function
Merge branch 'mrijken/socket-close-refactor' of https://github.com/lambdafu/circus into lambdafu-mrijken/socket-close-refactor
added a test