mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
Inspector: Don't call CSocket::connect() before setting up hooks
This commit is contained in:
parent
8c8fecd6bf
commit
292b89b2e8
1 changed files with 7 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
||||||
#include "RemoteObjectGraphModel.h"
|
#include "RemoteObjectGraphModel.h"
|
||||||
#include "RemoteObjectPropertyModel.h"
|
#include "RemoteObjectPropertyModel.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
RemoteProcess::RemoteProcess(pid_t pid)
|
RemoteProcess::RemoteProcess(pid_t pid)
|
||||||
: m_pid(pid)
|
: m_pid(pid)
|
||||||
|
@ -12,12 +13,6 @@ RemoteProcess::RemoteProcess(pid_t pid)
|
||||||
|
|
||||||
void RemoteProcess::update()
|
void RemoteProcess::update()
|
||||||
{
|
{
|
||||||
auto success = m_socket.connect(CSocketAddress::local(String::format("/tmp/rpc.%d", m_pid)));
|
|
||||||
if (!success) {
|
|
||||||
fprintf(stderr, "Couldn't connect to PID %d\n", m_pid);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_socket.on_connected = [this] {
|
m_socket.on_connected = [this] {
|
||||||
dbg() << "Connected to PID " << m_pid;
|
dbg() << "Connected to PID " << m_pid;
|
||||||
};
|
};
|
||||||
|
@ -63,4 +58,10 @@ void RemoteProcess::update()
|
||||||
|
|
||||||
m_object_graph_model->update();
|
m_object_graph_model->update();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto success = m_socket.connect(CSocketAddress::local(String::format("/tmp/rpc.%d", m_pid)));
|
||||||
|
if (!success) {
|
||||||
|
fprintf(stderr, "Couldn't connect to PID %d\n", m_pid);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue