int32_t deregisterService(const std::string& host, const int32_t port) { // Your implementation goes here printf("deregisterService\n"); pair<string,int> host_tuple(host,port); host_list_t::iterator it = host_list.begin(); while(it!=host_list.end()){ thrift_container_t container = *it; if(container.host.compare(host)==0 && container.port==port){ printf("Found a matching entry\n"); it = host_list.erase(it); }else{ ++it; } } printf("There are now %u workers\n",(uint)host_list.size()); }