[Haskell-cafe] STM, Concurrent Haskell and network clients (long, code)

Tomasz Zielonka tomasz.zielonka at gmail.com
Sun Dec 4 14:08:42 EST 2005


On Fri, Dec 02, 2005 at 03:20:20PM +0000, Joel Reymont wrote:
> The rest of the relevant code is below. Please let me know if it can  
> be simplified or made more robust.
> 
> maybeFreeSSL :: MaybeSSL -> IO ()
> maybeFreeSSL tmv =
>     do putStrLn $ "maybeFreeSSL invoked"
>        mssl <- atomically $ swapTMVar tmv Nothing
>        case mssl of
>          Nothing -> return ()
>          Just (ssl, _, _) -> do sslFree ssl
>                                 sslFree ssl

It should suffice to sslFree ssl once ;-)
I think you forgot to remove it after testing.

Best regards
Tomasz

-- 
I am searching for a programmer who is good at least in some of
[Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland


More information about the Haskell-Cafe mailing list