1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-01 23:25:09 +02:00

fix wrong datatype in network timeout timestamp

This commit is contained in:
p2r3
2025-08-29 17:22:18 +03:00
parent 200e9154a0
commit 2f0bf1d802

View File

@@ -38,7 +38,7 @@ ssize_t recv_all (int client_fd, void *buf, size_t n, uint8_t require_first) {
// Track time of last meaningful network update // Track time of last meaningful network update
// Used to handle timeout when client is stalling // Used to handle timeout when client is stalling
int32_t last_update_time = get_program_time(); int64_t last_update_time = get_program_time();
// If requested, exit early when first byte not immediately available // If requested, exit early when first byte not immediately available
if (require_first) { if (require_first) {
@@ -84,7 +84,7 @@ ssize_t send_all (int client_fd, const void *buf, ssize_t len) {
// Track time of last meaningful network update // Track time of last meaningful network update
// Used to handle timeout when client is stalling // Used to handle timeout when client is stalling
int32_t last_update_time = get_program_time(); int64_t last_update_time = get_program_time();
// Busy-wait (with task yielding) until all data has been sent // Busy-wait (with task yielding) until all data has been sent
while (sent < len) { while (sent < len) {