aboutsummaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--socket.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index dd98f7c..012158c 100644
--- a/socket.c
+++ b/socket.c
@@ -1115,9 +1115,16 @@ link_socket_init_phase2 (struct link_socket *sock,
struct gc_arena gc = gc_new ();
const char *remote_dynamic = NULL;
bool remote_changed = false;
+ int sig_save = 0;
ASSERT (sock);
+ if (signal_received && *signal_received)
+ {
+ sig_save = *signal_received;
+ *signal_received = 0;
+ }
+
/* initialize buffers */
socket_frame_init (frame, sock);
@@ -1321,6 +1328,11 @@ link_socket_init_phase2 (struct link_socket *sock,
&gc));
done:
+ if (sig_save && signal_received)
+ {
+ if (!*signal_received)
+ *signal_received = sig_save;
+ }
gc_free (&gc);
}