Skip to content

Commit

Permalink
Double Socket Fix (#45)
Browse files Browse the repository at this point in the history
So uh I was just connecting twice. Quite the embarassing fix, but at
least it's done now!
  • Loading branch information
kyle8998 committed Jul 15, 2018
1 parent a3d9c39 commit 951a223
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 160 deletions.
12 changes: 7 additions & 5 deletions index.html
Expand Up @@ -5,11 +5,14 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-121783460-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
window.dataLayer = window.dataLayer || [];

gtag('config', 'UA-121783460-1');
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'UA-121783460-1');
</script>

<meta charset="utf-8">
Expand Down Expand Up @@ -414,7 +417,6 @@ <h2>Contact Me</h2>

// Chat stuff
$(function() {
//var socket = io.connect();
var $messageForm = $('#messageForm');
var $message = $('#message');
var $chat = $('#chat');
Expand Down
1 change: 0 additions & 1 deletion js/sync.js
Expand Up @@ -351,7 +351,6 @@ function changeSinglePlayer(playerId) {
// Client Synchronization Stuff //
//------------------------------//

var socket = io.connect();
var roomnum = 1
var id = "M7lc1UVf-VE"

Expand Down
150 changes: 0 additions & 150 deletions play.js

This file was deleted.

4 changes: 0 additions & 4 deletions server.js
Expand Up @@ -55,10 +55,6 @@ io.sockets.on('connection', function(socket) {
connections.push(socket);
console.log('Connected: %s sockets connected', connections.length);

console.log(socket.request.connection.remoteAddress)
// console.log(socket.request)
console.log(socket.handshake)

// Set default room, if provided in url
socket.emit('set id', {
id: given_room
Expand Down

0 comments on commit 951a223

Please sign in to comment.