gameServer/ClientIO.hs
changeset 11027 ba585693e19d
parent 10460 8dcea9087d75
child 11046 47a8c19ecb60
--- a/gameServer/ClientIO.hs	Tue Jul 21 23:51:58 2015 +0300
+++ b/gameServer/ClientIO.hs	Thu Jul 23 19:51:14 2015 +0300
@@ -55,6 +55,7 @@
             unless (B.null recvBS) $ do
                 let (packets, newrecvBuf) = bs2Packets $ B.append recvBuf recvBS
                 forM_ packets sendPacket
+                when (B.length newrecvBuf > 128 * 1024) $ sendPacket ["QUIT", "Protocol violation"]
                 receiveWithBufferLoop $ B.copy newrecvBuf
 
         sendPacket packet = writeChan chan $ ClientMessage (ci, packet)