Check if session is active before rejecting concurrent.
Make sure that heapprofd_initialize does not deadlock even if
unpatching of hooks failed.
Make the control socket non blocking so we do not block the client.
Change-Id: Ie71c33861ddf7da6bde33d8334692f17e201d7e2
diff --git a/src/profiling/memory/client.h b/src/profiling/memory/client.h
index f39af55..745fd68 100644
--- a/src/profiling/memory/client.h
+++ b/src/profiling/memory/client.h
@@ -90,11 +90,13 @@
const char* main_thread_stack_base);
ClientConfiguration client_config_for_testing() { return client_config_; }
+ bool IsConnected();
private:
const char* GetStackBase();
// Flush the contents of free_batch_. Must hold free_batch_lock_.
bool FlushFreesLocked();
+ bool SendControlSocketByte();
ClientConfiguration client_config_;
// sampler_ operations are not thread-safe.