From 368c09d86d4f0c3e614f18624425ad2e593c2f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Thu, 1 Apr 2021 03:28:32 +0000 Subject: [PATCH] khan: sequence number before socket open --- pkg/urbit/vere/io/khan.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/urbit/vere/io/khan.c b/pkg/urbit/vere/io/khan.c index b646956d0..17a5a3574 100644 --- a/pkg/urbit/vere/io/khan.c +++ b/pkg/urbit/vere/io/khan.c @@ -102,6 +102,16 @@ u3_khan_io_init(u3_pier* pir_u) car_u->io.kick_f = _khan_io_kick; car_u->io.exit_f = _khan_io_exit; + { + u3_noun now; + struct timeval tim_u; + gettimeofday(&tim_u, 0); + + now = u3_time_in_tv(&tim_u); + cop_u->sev_l = u3r_mug(now); + u3z(now); + } + // Open socket. The full socket path is limited to about 108 characters, and // we want it to be relative to the pier. So we save our current path, chdir // to the pier, open the socket at the desired path, then chdir back. @@ -131,15 +141,5 @@ u3_khan_io_init(u3_pier* pir_u) } } - { - u3_noun now; - struct timeval tim_u; - gettimeofday(&tim_u, 0); - - now = u3_time_in_tv(&tim_u); - cop_u->sev_l = u3r_mug(now); - u3z(now); - } - return car_u; }