Skip to content

Commit dececa5

Browse files
Destroy stream, then close server
1 parent c83c7af commit dececa5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/Test/Main.purs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import Prelude
55
import Data.Array as Array
66
import Data.FoldableWithIndex (forWithIndex_)
77
import Effect (Effect)
8+
import Effect.Aff (Milliseconds(..), delay, launchAff_)
9+
import Effect.Class (liftEffect)
810
import Effect.Class.Console (log)
911
import Effect.Exception as Exception
1012
import Effect.Ref as Ref
@@ -62,7 +64,6 @@ main = do
6264
void $ Stream.end duplex \_ -> do
6365
log $ "server - onStream - closing for id: " <> show streamId
6466
H2Stream.close stream NGHTTP2.noError
65-
Server.close server
6667

6768
Server.onTimeout server do
6869
log "onTimeout"
@@ -103,4 +104,6 @@ main = do
103104
str <- Buffer.toString UTF8 buffer :: Effect String
104105
log $ "client - onResponse body: " <> show str
105106
H2Stream.close stream NGHTTP2.noError
107+
Session.destroy session
108+
Server.close server
106109

0 commit comments

Comments
 (0)