Complete the handshake

This commit is contained in:
2025-04-05 23:27:15 -04:00
parent de1c34608a
commit 2ca078a949

View File

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