--- deliantra/server/socket/loop.C 2007/07/01 06:07:03 1.57 +++ deliantra/server/socket/loop.C 2007/07/05 10:34:08 1.58 @@ -201,8 +201,13 @@ { if (fxix) { - // 9 bytes is enough for fx_FFFOOO, 240 leaves some room for image data - int chunk = min (min (avail - 240, MAXSOCKBUF - 9), ix.ofs); + // only transfer something if the amount of data transferred + // has a healthy relation to the header overhead + if (avail <= 40) + break; + + // 9 bytes is enough for fx_FFFOOO + int chunk = min (min (avail, MAXSOCKBUF - 9), (int)ix.ofs); if (chunk <= 0) break;