@@ -316,11 +316,12 @@ stream FrameRSTStream header bs ctx _ strm = do
316 closed ctx strm cc
316 closed ctx strm cc
317 return $ Closed cc -- will be written to streamState again
317 return $ Closed cc -- will be written to streamState again
319−stream FramePriority header bs Context{outputQ} s Stream{streamNumber} = do
319+stream FramePriority header bs Context{outputQ} s Stream{streamNumber,streamPriority} = do
320 PriorityFrame p <- guardIt $ decodePriorityFrame header bs
320 PriorityFrame p <- guardIt $ decodePriorityFrame header bs
321 checkPriority p streamNumber
321 checkPriority p streamNumber
322− -- fixme: the case where priority is changed.
322+ -- checkme: this should be tested
323+ writeIORef streamPriority p
323− prepare outputQ streamNumber p
324+ when (isIdle s) $ prepare outputQ streamNumber p
326-- this ordering is important
327-- this ordering is important