diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-04-21 22:23:00 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-04-21 22:24:51 -0400 |
commit | 75c8b6b9745ea8e64383e28d3f18b1609be00fa3 (patch) | |
tree | 3cdbe871bf78eddb38307def309e5a982234fdc1 /Server.hs | |
parent | 51702e72de15637653f8cc153ffeb43cdb194827 (diff) | |
download | debug-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.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |