Skip to content

Commit

Permalink
Use 0.0.0.0 instead of localhost
Browse files Browse the repository at this point in the history
As previously discussed in [1] and [2], all web activities running in
sugar shell should use "0.0.0.0" instead of "localhost", considering
the server is always going to be used via the local network interface.

This fixes the problem in Ubuntu 14.04 LTS where libsoup is not able
to resolve localhost when no active network is present, breaking web
activities integration with sugar shell.

[1] https://dev.laptop.org/ticket/12479
[2] https://dev.laptop.org/ticket/12503

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
  • Loading branch information
tchx84 committed Jun 8, 2015
1 parent 9c78774 commit e17b17d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bus.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define(["sugar-web/env"], function (env) {

env.getEnvironment(function (error, environment) {
var port = environment.apiSocketPort;
var socket = new WebSocket("ws://localhost:" + port);
var socket = new WebSocket("ws://0.0.0.0:" + port);

socket.binaryType = "arraybuffer";

Expand Down

0 comments on commit e17b17d

Please sign in to comment.