summaryrefslogtreecommitdiffhomepage
path: root/Server.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-21 22:23:00 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-21 22:24:51 -0400
commit75c8b6b9745ea8e64383e28d3f18b1609be00fa3 (patch)
tree3cdbe871bf78eddb38307def309e5a982234fdc1 /Server.hs
parent51702e72de15637653f8cc153ffeb43cdb194827 (diff)
downloaddebug-me-75c8b6b9745ea8e64383e28d3f18b1609be00fa3.tar.gz
add --download mode
Nice, was able to reuse all the protocol stuff from Role.Developer for this. This commit was sponsored by Fernando Jimenez on Patreon.
Diffstat (limited to 'Server.hs')
-rw-r--r--Server.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Server.hs b/Server.hs
index 3dd94be..1de02a4 100644
--- a/Server.hs
+++ b/Server.hs
@@ -17,6 +17,7 @@ import Control.Concurrent.STM
import Control.Concurrent.STM.TMChan
import Control.Concurrent.Async
import qualified Data.Map as M
+import qualified Data.Text as T
import Control.Exception
import Data.Time.Clock.POSIX
@@ -43,7 +44,7 @@ websocketApp o ssv pending_conn = do
theirmode <- getMode conn
case theirmode of
InitMode _ -> user o ssv conn
- ConnectMode t -> case mkSessionID t of
+ ConnectMode t -> case mkSessionID (T.unpack t) of
Nothing -> error "Invalid session id!"
Just sid -> developer o ssv sid conn