From 31574ec63ab36c6d6d0dcc8f35aba7200bc5d2e8 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Tue, 16 Apr 2019 17:13:10 +0200 Subject: [PATCH] Actually make it build, fix simple warning --- src/HttpResponse.h | 2 +- src/WebSocketProtocol.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HttpResponse.h b/src/HttpResponse.h index 3170bac..2796f3a 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -283,7 +283,7 @@ public: auto [written, failed] = Super::uncork(); if (failed) { // do we have the same timeout for websockets? - ((AsyncSocket *) s)->timeout(HTTP_IDLE_TIMEOUT_S); + Super::timeout(10); // this is completely wrong! } } diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h index e47c945..ea4c086 100644 --- a/src/WebSocketProtocol.h +++ b/src/WebSocketProtocol.h @@ -89,7 +89,7 @@ T cond_byte_swap(T value) { uint8_t b[sizeof(T)]; } src = { value }, dst; - for (int i = 0; i < sizeof(value); i++) { + for (unsigned int i = 0; i < sizeof(value); i++) { dst.b[i] = src.b[sizeof(value) - 1 - i]; }