Permalink
Browse files

server: fix simulated latency bias

  • Loading branch information...
brianmcd committed Apr 9, 2012
1 parent a0c260b commit c8029abc2448cd161539b93b45b54c841a2f6b00
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/server/index.coffee
View
@@ -91,8 +91,8 @@ class Server extends EventEmitter
io.set('log level', 1)
io.sockets.on 'connection', (socket) =>
if Config.simulateLatency
- latency = Math.random() * 120
- latency = Math.max(20, latency)
+ latency = Math.random() * 100
+ latency += 20
console.log("Assigning client #{latency} ms of latency.")
oldEmit = socket.emit
socket.emit = () ->

0 comments on commit c8029ab

Please sign in to comment.