it works ok, except that sometimes i get
<snip>
select: Bad file descriptor
StaticHttpServer: fatal error: select failed
</snip>
i can't seem to catch this exception (is it an exception?).
so, does anybody know what this is and whether it can be dealt with
gracefully? right now, it crashes the server.
i suppose i should provide some info about the system ... i'm running
debian woody with package ghc5-5.02.2-1.
if you'd like to see the source code, let me know. i'll make an
attempt to highlight the main loop, which is essentially:
acceptingLoop :: TcpServer -> MVar () -> (Exception -> IO Bool) -> IO
()
acceptingLoop s@(TcpServer sock _) mvar handleException =
do
catch (acceptingLoopSafe s)
(\e -> do
res <- handleException e
if res
then
acceptingLoop s mvar handleException
else
do
sClose sock
putMVar mvar ())
and the handleException i'm using now just logs to stderr and returns
true.
any help would be greatly appreciated,
-- p
> <snip>
> select: Bad file descriptor
> StaticHttpServer: fatal error: select failed
> </snip>
duh, i should have indicated that i'm not using the haskell select
call. rather i'm using concurrent haskell, so this select is
occurring "under the hood".
again, any help would be greatly appreciated,
-- p