Skip to content

Commit 93d7efa

Browse files
kalenikaliaksandrtrflynn89
authored andcommitted
LibIPC: Delete unused code in Connection
1 parent a5697b4 commit 93d7efa

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

Libraries/LibIPC/Connection.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <AK/Vector.h>
1010
#include <LibCore/Socket.h>
11-
#include <LibCore/Timer.h>
1211
#include <LibIPC/Connection.h>
1312
#include <LibIPC/Message.h>
1413
#include <LibIPC/Stub.h>
@@ -20,8 +19,6 @@ ConnectionBase::ConnectionBase(IPC::Stub& local_stub, NonnullOwnPtr<Transport> t
2019
, m_transport(move(transport))
2120
, m_local_endpoint_magic(local_endpoint_magic)
2221
{
23-
m_responsiveness_timer = Core::Timer::create_single_shot(3000, [this] { may_have_become_unresponsive(); });
24-
2522
m_transport->set_up_read_hook([this] {
2623
NonnullRefPtr protect = *this;
2724
// FIXME: Do something about errors.
@@ -51,7 +48,6 @@ ErrorOr<void> ConnectionBase::post_message(MessageBuffer buffer)
5148

5249
MUST(buffer.transfer_message(*m_transport));
5350

54-
m_responsiveness_timer->start();
5551
return {};
5652
}
5753

@@ -107,8 +103,6 @@ ErrorOr<void> ConnectionBase::drain_messages_from_peer()
107103
});
108104

109105
if (!m_unprocessed_messages.is_empty()) {
110-
m_responsiveness_timer->stop();
111-
did_become_responsive();
112106
deferred_invoke([this] {
113107
handle_messages();
114108
});

Libraries/LibIPC/Connection.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class ConnectionBase : public Core::EventReceiver {
3636
protected:
3737
explicit ConnectionBase(IPC::Stub&, NonnullOwnPtr<Transport>, u32 local_endpoint_magic);
3838

39-
virtual void may_have_become_unresponsive() { }
40-
virtual void did_become_responsive() { }
4139
virtual void shutdown_with_error(Error const&);
4240
virtual OwnPtr<Message> try_parse_message(ReadonlyBytes, Queue<File>&) = 0;
4341

@@ -51,8 +49,6 @@ class ConnectionBase : public Core::EventReceiver {
5149

5250
NonnullOwnPtr<Transport> m_transport;
5351

54-
RefPtr<Core::Timer> m_responsiveness_timer;
55-
5652
Vector<NonnullOwnPtr<Message>> m_unprocessed_messages;
5753

5854
u32 m_local_endpoint_magic { 0 };
@@ -66,12 +62,6 @@ class Connection : public ConnectionBase {
6662
{
6763
}
6864

69-
template<typename MessageType>
70-
OwnPtr<MessageType> wait_for_specific_message()
71-
{
72-
return wait_for_specific_endpoint_message<MessageType, LocalEndpoint>();
73-
}
74-
7565
template<typename RequestType, typename... Args>
7666
NonnullOwnPtr<typename RequestType::ResponseType> send_sync(Args&&... args)
7767
{

0 commit comments

Comments
 (0)