Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58eaeca

Browse files
committed
Merge branch 'master' of github.com:Automattic/socket.io
2 parents 94157e6 + 0935b81 commit 58eaeca

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/socket.io.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,23 @@ describe('socket.io', function(){
597597
});
598598
});
599599
});
600+
601+
it('should not reuse same-namespace connections', function(done){
602+
var srv = http();
603+
var sio = io(srv);
604+
var connections = 0;
605+
606+
srv.listen(function() {
607+
var clientSocket1 = client(srv);
608+
var clientSocket2 = client(srv);
609+
sio.on('connection', function() {
610+
connections++;
611+
if(connections === 2) {
612+
done();
613+
}
614+
});
615+
});
616+
});
600617
});
601618

602619
describe('socket', function(){

0 commit comments

Comments
 (0)