Skip to content

Commit

Permalink
delete reduntant codes of PR 349
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexStocks committed Aug 5, 2024
1 parent d7afaa5 commit 5a693f0
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 357 deletions.
2 changes: 2 additions & 0 deletions src/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,15 @@ void PClient::OnConnect() {

std::string PClient::PeerIP() const {
if (!addr_.IsValid()) {
ERROR("Invalid address detected for client {}", uniqueID());
return "";
}
return addr_.GetIP();
}

int PClient::PeerPort() const {
if (!addr_.IsValid()) {
ERROR("Invalid address detected for client {}", uniqueID());
return 0;
}
return addr_.GetPort();
Expand Down
2 changes: 0 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ extern struct PErrorInfo {

int StrToLongDouble(const char* s, size_t slen, long double* ldval);

// class UnboundedBuffer;

std::size_t FormatInt(long value, UnboundedBuffer* reply);
std::size_t FormatBulk(const char* str, std::size_t len, UnboundedBuffer* reply);
std::size_t FormatBulk(const PString& str, UnboundedBuffer* reply);
Expand Down
241 changes: 0 additions & 241 deletions src/io_thread_pool.cc

This file was deleted.

110 changes: 0 additions & 110 deletions src/io_thread_pool.h

This file was deleted.

1 change: 0 additions & 1 deletion src/pikiwidb.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "cmd_table_manager.h"
#include "cmd_thread_pool.h"
#include "common.h"
#include "io_thread_pool.h"
#include "net/event_server.h"

#define KPIKIWIDB_VERSION "4.0.0"
Expand Down
1 change: 0 additions & 1 deletion src/pubsub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <fnmatch.h>

#include "client.h"
// #include "event_loop.h"
#include "log.h"
#include "pubsub.h"

Expand Down
Loading

0 comments on commit 5a693f0

Please sign in to comment.