on master help sign in
cleanup enumSocket
commit2f45a71da787c4afb1e6bee489fac235778190d7 authorMatt Brown <matt@softmechanics.net> dateMon 28 Feb 2011, 12:23 (16 years ago) parent824691a
1 file changed+2−6
Network/Wai/Handler/Warp.hs+2−6
Network/Wai/Handler/Warp.hs+2−6
@@ -377,13 +377,9 @@ enumSocket th len socket =
377377 bs <- liftIO $ Sock.recv socket len
378378 liftIO $ T.tickle th
379379 if S.null bs
380− then E.throwError SocketTimeout
381− else go k bs
380+ then E.continue k
381+ else k (E.Chunks [bs]) >>== inner
382382 inner step = E.returnI step
383− go k bs
384− | S.length bs == 0 = E.continue k
385− | otherwise = k (E.Chunks [bs]) >>== enumSocket th len socket
386−
387383------ The functions below are not warp-specific and could be split out into a
388384--separate package.
389385