| 276 | } |
| 277 | |
| 278 | AuthenticationHashFromFile::~AuthenticationHashFromFile() { |
| 279 | // Signal the reload thread to stop. |
| 280 | if (stop_pipe_write_fd_ >= 0) { |
| 281 | write(stop_pipe_write_fd_, "x", 1); // Write a byte to signal shutdown. |
| 282 | close(stop_pipe_write_fd_); |
| 283 | } |
| 284 | if (reload_thread_.joinable()) { |
| 285 | reload_thread_.join(); |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | Status AuthenticationHashFromFile::Init() { |
| 290 | RETURN_IF_ERROR(LoadKey()); |