Complete the handshake

This commit is contained in:
2025-04-05 23:27:15 -04:00
parent a2072436aa
commit ec94e85ab9

View File

@@ -131,10 +131,13 @@ pub fn connect(payload: []const u8, allocator: Allocator) !?SaprusMessage {
try setting_up_socket.timedWait(500 * 1000 * 1000 * 1000); try setting_up_socket.timedWait(500 * 1000 * 1000 * 1000);
const msg = try sendInitialConnection(payload, initial_port, allocator); const msg = try sendInitialConnection(payload, initial_port, allocator);
_ = msg;
// Await response from the sentinel
response_thread.join(); response_thread.join();
// Complete handshake after awaiting response
try broadcastSaprusMessage(msg, allocator);
return initial_conn_res; return initial_conn_res;
} }