Closed erikd closed 4 years ago
you can use this
pingThread :: Connection -> IO () -> IO ()
pingThread connection = WS.withPingThread connection 30 (return ())
this support both variant (depending on version)
pingThread :: Connection -> IO () -> IO ()
#if MIN_VERSION_websockets(0,12,6)
pingThread connection = WS.withPingThread connection 30 (return ())
#else
pingThread connection = (WS.forkPingThread connection 30 >>)
#endif
forkPingThread
is deprecated but it is not obvious how to replace it withwithPingThread
in the code (from packagenetwork-simple-wss
):