Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky-Session not working in IE and FireFox #13

Open
doanmanhsonha opened this issue Oct 1, 2014 · 3 comments
Open

Sticky-Session not working in IE and FireFox #13

doanmanhsonha opened this issue Oct 1, 2014 · 3 comments

Comments

@doanmanhsonha
Copy link

Hi everyone,
I write a simple code to try sticky-session and socket-io.
With Google Chrome, I can see "Hello World!" return.
IE and FF keep loading and nothing return.
Can you give me hint how to settle my problem?
Here is the source:
var sticky = require('sticky-session');
var fs = require('fs');
sticky(function () {
// This code will be executed only in slave workers

var http = require('http'),
    io = require('socket.io');

var server = http.createServer(function (req, res) {
    if (req.url === '/' || req.url === '/index.html') { 
        fs.readFile(__dirname + '/statics/html/index.html',
        function (err, data) {
            if (err) {
                res.writeHead(500);
                return res.end('Error loading index.html');
            }

            res.writeHead(200, {'Content-Type': 'text/html'});
            res.end(data);
        });
    }
});
io.listen(server);

return server;

}).listen(8000, function () {
console.log('server started on 8000 port');
});

Index.html

<title></title>

Hello

World!

@Sifogiannos
Copy link

I had the same problem even sometimes with Chrome and Safari!!!
I think the problem is somewhere in the ip hash.

@aidanxyz
Copy link

Same problem here. Any news on this issue? How do you make it work on FF, IE?

@lyenliang
Copy link

This problem always occurs on my IE.
Sometimes it works correctly on my Firefox, and Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants