{"action":"opened","issue":{"url":"https://api.github.com/repos/grpc/grpc/issues/6234","repository_url":"https://api.github.com/repos/grpc/grpc","labels_url":"https://api.github.com/repos/grpc/grpc/issues/6234/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/6234/comments","events_url":"https://api.github.com/repos/grpc/grpc/issues/6234/events","html_url":"https://github.com/grpc/grpc/issues/6234","id":149855146,"number":6234,"title":"Memory Leak from gRPC client to disconnected Server","user":{"login":"johnco3","id":6711520,"avatar_url":"https://avatars.githubusercontent.com/u/6711520?v=3","gravatar_id":"","url":"https://api.github.com/users/johnco3","html_url":"https://github.com/johnco3","followers_url":"https://api.github.com/users/johnco3/followers","following_url":"https://api.github.com/users/johnco3/following{/other_user}","gists_url":"https://api.github.com/users/johnco3/gists{/gist_id}","starred_url":"https://api.github.com/users/johnco3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnco3/subscriptions","organizations_url":"https://api.github.com/users/johnco3/orgs","repos_url":"https://api.github.com/users/johnco3/repos","events_url":"https://api.github.com/users/johnco3/events{/privacy}","received_events_url":"https://api.github.com/users/johnco3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-20T18:54:14Z","updated_at":"2016-04-20T18:54:14Z","closed_at":null,"body":"I tried sending an RPC request from a grpc client to a powered off server from localhost->localhost on a Windows environment (I did not test this on another environment).  The output from the console is shown below.\r\n\r\nNote I am using the latest master branch code as or April-15th, and I am not sure whether it is relevant, but I also set a 5 second timeout in the ClientContext. \r\n\r\nE0415 12:42:11.471000000 15916 tcp_client_windows.c:106] on_connect error connecting to 'ipv6:[::1]:50051': No connection could be made because the target machine actively refused it.\r\n\r\nE0415 12:42:12.472000000 15916 tcp_client_windows.c:106] on_connect error connecting to 'ipv4:127.0.0.1:50051': No connection could be made because the target machine actively refused it, however it loo\r\n\r\n```\r\nD0415 12:42:13.503000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:14.503000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:15.503000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:16.504000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:17.504000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:18.505000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:19.505000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:20.505000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:21.505000000 15916 iomgr.c:99] Waiting for 1 iomgr objects to be destroyed\r\nD0415 12:42:22.505000000 15916 iomgr.c:117] Failed to free 1 iomgr objects before shutdown deadline: memory leaks are likely\r\nD0415 12:42:22.505000000 15916 iomgr.c:80] LEAKED OBJECT: client:socket=0x000000\r\n00002B0160 00000000002B0228\r\n```\r\n\r\nClient code as follows:\r\n\r\n```\r\nstd::unique_ptr<ca::Response>\r\nCAClient::getMaintenanceOTPMessage() const\r\n{\r\n    ClientContext context;\r\n    context.set_deadline(\r\n        system_clock::now() +\r\n        milliseconds(5000));\r\n    google::protobuf::Empty empty;\r\n    ca::Response message;\r\n    std::unique_ptr<ca::Response> result;\r\n    auto status = stub_->GetMaintenanceOTPMessage(&context, empty, &message); \r\n\r\n```"}}