diff --git a/src/requesthandler/types/RequestBatchExecutionType.h b/src/requesthandler/types/RequestBatchExecutionType.h
index d778ee99..df158ffe 100644
--- a/src/requesthandler/types/RequestBatchExecutionType.h
+++ b/src/requesthandler/types/RequestBatchExecutionType.h
@@ -22,7 +22,7 @@ with this program. If not, see
#include
namespace RequestBatchExecutionType {
- enum RequestBatchExecutionType {
+ enum RequestBatchExecutionType: int8_t {
/**
* Not a request batch.
*
@@ -77,7 +77,7 @@ namespace RequestBatchExecutionType {
Parallel = 2,
};
- inline bool IsValid(int executionType)
+ inline bool IsValid(int8_t executionType)
{
return executionType >= None && executionType <= Parallel;
}
diff --git a/src/websocketserver/WebSocketServer_Protocol.cpp b/src/websocketserver/WebSocketServer_Protocol.cpp
index 689ef977..67c082c3 100644
--- a/src/websocketserver/WebSocketServer_Protocol.cpp
+++ b/src/websocketserver/WebSocketServer_Protocol.cpp
@@ -233,7 +233,7 @@ void WebSocketServer::ProcessMessage(SessionPtr session, WebSocketServer::Proces
return;
}
- uint8_t requestedExecutionType = payloadData["executionType"];
+ int8_t requestedExecutionType = payloadData["executionType"];
if (!RequestBatchExecutionType::IsValid(requestedExecutionType) || requestedExecutionType == RequestBatchExecutionType::None) {
ret.closeCode = WebSocketCloseCode::InvalidDataFieldValue;
ret.closeReason = "Your `executionType` has an invalid value.";