diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 # ChangeLog
 
+## 0.2.2
+
+# Introducing streamNotCreatedYet for STOP_SENDING.
+
 ## 0.2.1
 
 * Using recvMsg and sendBufMsg.
diff --git a/Network/QUIC/Receiver.hs b/Network/QUIC/Receiver.hs
--- a/Network/QUIC/Receiver.hs
+++ b/Network/QUIC/Receiver.hs
@@ -210,14 +210,21 @@
     | otherwise = isServerInitiated sid
 
 guardStream :: Connection -> StreamId -> Maybe Stream -> IO ()
-guardStream conn sid Nothing
+guardStream conn sid Nothing =
+    streamNotCreatedYet
+        conn
+        sid
+        "a locally-initiated stream that has not yet been created"
+guardStream _ _ _ = return ()
+
+-- fixme: what about unidirection stream?
+streamNotCreatedYet :: Connection -> StreamId -> ReasonPhrase -> IO ()
+streamNotCreatedYet conn sid emsg
     | isInitiated conn sid = do
         curSid <- getMyStreamId conn
         when (sid > curSid) $
-            closeConnection
-                StreamStateError
-                "a locally-initiated stream that has not yet been created"
-guardStream _ _ _ = return ()
+            closeConnection StreamStateError emsg
+streamNotCreatedYet _ _ _ = return ()
 
 processFrame :: Connection -> EncryptionLevel -> Frame -> IO ()
 processFrame _ _ Padding{} = return ()
@@ -247,9 +254,7 @@
         closeConnection StreamStateError "Receive-only stream"
     mstrm <- findStream conn sid
     case mstrm of
-        Nothing -> do
-            when (isInitiated conn sid) $
-                closeConnection StreamStateError "No such stream for STOP_SENDING"
+        Nothing -> streamNotCreatedYet conn sid "No such stream for STOP_SENDING"
         Just _strm -> sendFramesLim conn lvl [ResetStream sid err 0]
 processFrame _ _ (CryptoF _ "") = return ()
 processFrame conn lvl (CryptoF off cdat) = do
@@ -338,11 +343,7 @@
         closeConnection StreamStateError "Receive-only stream"
     mstrm <- findStream conn sid
     case mstrm of
-        Nothing ->
-            when (isInitiated conn sid) $ do
-                curSid <- getMyStreamId conn
-                when (sid > curSid) $
-                    closeConnection StreamStateError "No such stream for MAX_STREAM_DATA"
+        Nothing -> streamNotCreatedYet conn sid "No such stream for MAX_STREAM_DATA"
         Just strm -> setTxMaxStreamData strm n
 processFrame conn lvl (MaxStreams dir n) = do
     when (lvl == InitialLevel || lvl == HandshakeLevel) $
diff --git a/quic.cabal b/quic.cabal
--- a/quic.cabal
+++ b/quic.cabal
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               quic
-version:            0.2.1
+version:            0.2.2
 license:            BSD3
 license-file:       LICENSE
 maintainer:         kazu@iij.ad.jp
