Avoid a crash in SET_KEEPALIVE if the socket transport is not initialized.
[mono.git] / mono / mini / debugger-agent.c
index 8d78df7a6624a5633a1b06ab07825c0f6db965b3..b9d5cd4491365a1ae2aa69eaccc58f9840ecae4c 100644 (file)
@@ -1097,7 +1097,7 @@ set_keepalive (void)
        struct timeval tv;
        int result;
 
-       if (!agent_config.keepalive)
+       if (!agent_config.keepalive || !conn_fd)
                return;
 
        tv.tv_sec = agent_config.keepalive / 1000;