| 123 | http(_http) {} |
| 124 | |
| 125 | ~ResourceProvider() |
| 126 | { |
| 127 | LOG(INFO) << "Terminating resource provider " << info.id(); |
| 128 | |
| 129 | http.close(); |
| 130 | |
| 131 | foreachvalue (const Owned<Promise<Nothing>>& publish, publishes) { |
| 132 | publish->fail( |
| 133 | "Failed to publish resources from resource provider " + |
| 134 | stringify(info.id()) + ": Connection closed"); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | ResourceProviderInfo info; |
| 139 | StreamingHttpConnection<v1::resource_provider::Event> http; |