Closed froozen closed 8 years ago
The handler for version 1 gets executed first, which doesn’t terminate. If you change it so it does, the client will print Connected!
:
diff --git a/src/Demo/Client.hs b/src/Demo/Client.hs
index ee32a7c..23f04a5 100644
--- a/src/Demo/Client.hs
+++ b/src/Demo/Client.hs
@@ -25,7 +25,4 @@ main = do
liftIO . putStrLn $ "Connected!"
nextPacket con >>= liftIO . print)
-handler con =
- forever $ do
- p <- nextPacket con
- liftIO . print $ p
+handler con = return ()
Good point, reworking the demos anyways.
Running
client
and telling it to connect to theserver
doesn't seem to be doing anything for me. Looking at its code, it seems like it should printConnected!
, but it doesn't do that. Am I the only one with that problem or does it not work for you as well?