respondToPong :: SEvent -> Bot ()
respondToPong (SPong _ _) = do
    getGlobal pingTimeoutHandle >>= removeTimer
    tm <- getGlobal' pingTimeoutLen
    runInS tm pingTimeout >>= setGlobal pingTimeoutHandle

-- | Disconnect from the server by any means by killing the listener thread.
-- This will force a disconnect/reconnect in the main event thread.
respondToPong :: SEvent -> Bot ()
respondToPong (SPong _ _) = do
    getGlobal pingTimeoutHandle >>= removeTimer
    tm <- getGlobal' pingTimeoutLen
    runInS tm pingTimeout >>= setGlobal pingTimeoutHandle

-- | Disconnect from the server by any means by killing the listener thread.
-- This will force a disconnect/reconnect in the main event thread.
respondToPong (SPong _ _) = do
    getGlobal pingTimeoutHandle >>= removeTimer
    tm <- getGlobal' pingTimeoutLen
    runInS tm pingTimeout >>= setGlobal pingTimeoutHandle

-- | Disconnect from the server by any means by killing the listener thread.
-- This will force a disconnect/reconnect in the main event thread.