xcbosa-itx 2 жил өмнө
parent
commit
673eff8d95
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      frp.cpp

+ 3 - 3
frp.cpp

@@ -104,8 +104,8 @@ namespace xc::frp {
         void update() {
             struct stat buf;
             if (stat(this->filePath.c_str(), &buf) == 0) {
-                if (this->mutationTime != buf.st_mtimespec.tv_nsec) {
-                    this->mutationTime = buf.st_mtimespec.tv_nsec;
+                if (this->mutationTime != buf.st_mtime) {
+                    this->mutationTime = buf.st_mtime;
                     this->reloadConfig();
                     return;
                 }
@@ -160,7 +160,7 @@ namespace xc::frp {
         void doStart() {
             struct stat buf;
             if (stat(this->filePath.c_str(), &buf) == 0) {
-                this->mutationTime = buf.st_mtimespec.tv_nsec;
+                this->mutationTime = buf.st_mtime;
             }
             ostringstream oss;
             oss << "frpc -c " << this->filePath << " &";