gameServer/stresstest3.hs
branchexperimental3D
changeset 4004 b1c2c2f6fc5e
parent 3947 709fdb89f76c
--- a/gameServer/stresstest3.hs	Thu Aug 26 23:59:18 2010 +0200
+++ b/gameServer/stresstest3.hs	Wed Oct 27 14:02:20 2010 +0200
@@ -44,7 +44,7 @@
 
 emulateSession :: StateT SState IO ()
 emulateSession = do
-    n <- io $ randomRIO (100000::Int, 100000)
+    n <- io $ randomRIO (100000::Int, 100100)
     waitPacket "CONNECTED"
     sendPacket ["NICK", "test" ++ (show n)]
     waitPacket "NICK"
@@ -52,6 +52,7 @@
     waitPacket "PROTO"
     b <- waitPacket "LOBBY:JOINED"
     --io $ print b
+    sendPacket ["QUIT", "BYE"]
     return ()
 
 testing = Control.OldException.handle print $ do
@@ -62,7 +63,7 @@
     putStr "-"
     hFlush stdout
 
-forks = forever $ do
+forks = forM_ [1..100] $ const $ do
     delay <- randomRIO (10000::Int, 30000)
     threadDelay delay
     forkIO testing