ithewei 4 years ago
parent
commit
4251dd3f46
2 changed files with 2 additions and 2 deletions
  1. 1 1
      README.md
  2. 1 1
      evpp/EventLoop.h

+ 1 - 1
README.md

@@ -87,7 +87,7 @@ int main() {
         printf("%s\n", resp->body.c_str());
     }
 
-    auto resp = requests::post("127.0.0.1:8080/echo", "hello,world!");
+    resp = requests::post("127.0.0.1:8080/echo", "hello,world!");
     if (resp == NULL) {
         printf("request failed!\n");
     } else {

+ 1 - 1
evpp/EventLoop.h

@@ -218,7 +218,7 @@ static inline EventLoop* tlsEventLoop() {
 
 static inline TimerID setTimer(int timeout_ms, TimerCallback cb, int repeat = INFINITE) {
     EventLoop* loop = tlsEventLoop();
-    if (loop == NULL) return (TimerID)-1;
+    if (loop == NULL) return INVALID_TIMER_ID;
     return loop->setTimer(timeout_ms, cb, repeat);
 }