Skip to content
This repository
Browse code

server: fix simulated latency bias

  • Loading branch information...
commit c8029abc2448cd161539b93b45b54c841a2f6b00 1 parent a0c260b
Brian McDaniel authored April 09, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  src/server/index.coffee
4  src/server/index.coffee
@@ -91,8 +91,8 @@ class Server extends EventEmitter
91 91
             io.set('log level', 1)
92 92
         io.sockets.on 'connection', (socket) =>
93 93
             if Config.simulateLatency
94  
-                latency = Math.random() * 120
95  
-                latency = Math.max(20, latency)
  94
+                latency = Math.random() * 100
  95
+                latency += 20
96 96
                 console.log("Assigning client #{latency} ms of latency.")
97 97
                 oldEmit = socket.emit
98 98
                 socket.emit = () ->

0 notes on commit c8029ab

Please sign in to comment.
Something went wrong with that request. Please try again.