Set timeouts instead of sleeping

This commit is contained in:
2026-01-24 20:56:37 -05:00
parent 09152377ed
commit 3c5f34d5c2
3 changed files with 10 additions and 12 deletions

View File

@@ -113,10 +113,9 @@ pub fn connect(self: Client, io: Io, payload: []const u8) !SaprusConnection {
try self.socket.send(full_msg);
var res_buf: [4096]u8 = undefined;
// Ignore response from sentinel, just accept that we got one.
log.debug("Awaiting handshake response", .{});
// Ignore response from sentinel, just accept that we got one.
_ = try self.socket.receive(&res_buf);
try io.sleep(.fromMilliseconds(40), .real);
headers.udp.dst_port = udp_dest_port;
headers.ip.id = rand.int(u16);