Use GHC.Event instead of seperate thread for keepAlive.