aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/main.cpp3
-rw-r--r--client/sock.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/client/main.cpp b/client/main.cpp
index 36fc7bb..c01dbb5 100644
--- a/client/main.cpp
+++ b/client/main.cpp
@@ -17,9 +17,10 @@ int main(int argc, char** argv) {
uint16_t port = 9191;
if (argc >= 3) port = atoi(argv[2]);
+ PBSocket sock(addr, port);
try {
// connect to TCP socket (automatically spawns thread)
- PBSocket sock(addr, port);
+ sock.sock_connect();
} catch (const std::exception& e) {
printf("error: %s\n", e.what());
return EXIT_FAILURE;
diff --git a/client/sock.cpp b/client/sock.cpp
index 17d9e35..c10fba0 100644
--- a/client/sock.cpp
+++ b/client/sock.cpp
@@ -19,7 +19,6 @@ using std::thread;
PBSocket::PBSocket() { }
PBSocket::PBSocket(char* addr, uint16_t port) : PBSocket() {
set_server(addr, port);
- sock_connect();
}
PBSocket::~PBSocket() {