@@ -142,8 +142,8 @@ worker ctx@Context{inputQ,outputQ} set app responder tm = do
142 setThreadContinue tcont True
142 setThreadContinue tcont True
143 ex <- E.try $ do
143 ex <- E.try $ do
144 T.pause th
144 T.pause th
145− Input strm req <- atomically $ readTQueue inputQ
145+ inp@(Input strm req) <- atomically $ readTQueue inputQ
146− setStreamInfo sinfo strm req
146+ setStreamInfo sinfo inp
147 T.resume th
147 T.resume th
148 T.tickle th
148 T.tickle th
149 app req $ responder tcont th strm req
149 app req $ responder tcont th strm req
@@ -162,10 +162,10 @@ worker ctx@Context{inputQ,outputQ} set app responder tm = do
162 clearStreamInfo sinfo
162 clearStreamInfo sinfo
163 when (cont1 && cont2) $ go sinfo tcont th
163 when (cont1 && cont2) $ go sinfo tcont th
164 cleanup sinfo me = do
164 cleanup sinfo me = do
165− m <- getStreamInfo sinfo
165+ minp <- getStreamInfo sinfo
166− case m of
166+ case minp of
167− Nothing -> return ()
167+ Nothing -> return ()
168− Just (strm,req) -> do
168+ Just (Input strm req) -> do
169 closed ctx strm Killed
169 closed ctx strm Killed
170 let frame = resetFrame InternalError (streamNumber strm)
170 let frame = resetFrame InternalError (streamNumber strm)
171 enqueueControl outputQ 0 (OFrame frame)
171 enqueueControl outputQ 0 (OFrame frame)
@@ -218,7 +218,7 @@ getThreadContinue (ThreadContinue ref) = readIORef ref
218----------------------------------------------------------------
218----------------------------------------------------------------
220-- | The type to store enough information for 'settingsOnException'.
220-- | The type to store enough information for 'settingsOnException'.
221−newtype StreamInfo = StreamInfo (IORef (Maybe (Stream,Request)))
221+newtype StreamInfo = StreamInfo (IORef (Maybe Input))
223newStreamInfo :: IO StreamInfo
223newStreamInfo :: IO StreamInfo
224newStreamInfo = StreamInfo <$> newIORef Nothing
224newStreamInfo = StreamInfo <$> newIORef Nothing
@@ -226,8 +226,8 @@ newStreamInfo = StreamInfo <$> newIORef Nothing
226clearStreamInfo :: StreamInfo -> IO ()
226clearStreamInfo :: StreamInfo -> IO ()
227clearStreamInfo (StreamInfo ref) = writeIORef ref Nothing
227clearStreamInfo (StreamInfo ref) = writeIORef ref Nothing
229−setStreamInfo :: StreamInfo -> Stream -> Request -> IO ()
229+setStreamInfo :: StreamInfo -> Input -> IO ()
230−setStreamInfo (StreamInfo ref) strm req = writeIORef ref $ Just (strm,req)
230+setStreamInfo (StreamInfo ref) inp = writeIORef ref $ Just inp
232−getStreamInfo :: StreamInfo -> IO (Maybe (Stream, Request))
232+getStreamInfo :: StreamInfo -> IO (Maybe Input)
233getStreamInfo (StreamInfo ref) = readIORef ref
233getStreamInfo (StreamInfo ref) = readIORef ref