Extend JSONRPCServer test coverage
Properly close sockets