Skip to content

Commit

Permalink
Use 127.0.0.1 instead of localhost to make windows happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Dec 19, 2024
1 parent 535eeb2 commit 79a712d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion client_server/ComputeThread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void ComputeThread::try_connect()
wsclient.set_message_handler(std::bind(&ComputeThread::on_message, this, std::placeholders::_1));

std::ostringstream uristr;
uristr << "ws://" << (forced_server_ip_address.empty() ? "localhost" : forced_server_ip_address) << ":" << port;
uristr << "ws://" << (forced_server_ip_address.empty() ? "127.0.0.1" : forced_server_ip_address) << ":" << port;
wsclient.connect(uristr.str());

// std::cerr << "cadabra-client: connect done" << std::endl;
Expand Down
2 changes: 0 additions & 2 deletions client_server/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ Server::Server()
boost::uuids::uuid authentication_uuid = boost::uuids::random_generator()();
authentication_token = boost::uuids::to_string( authentication_uuid );
// FIXME: we do not actually do anything with this.
socket_name="tcp://localhost:5454";
init();
}

Server::Server(const std::string& socket)
// : return_cell_id(std::numeric_limits<uint64_t>::max()/2)
{
socket_name=socket;
init();
}

Expand Down
1 change: 0 additions & 1 deletion client_server/Server.hh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class Server {
void on_open(websocket_server::id_type id);
void on_close(websocket_server::id_type id);
websocket_server wserver;
std::string socket_name;

// Connection tracking. There can be multiple connections to
// the server, but they all have access to the same Python
Expand Down

0 comments on commit 79a712d

Please sign in to comment.