Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit577a2f0

Browse files
committed
It seems that without the notifySession being open in the middleware, the runtime detects the waiting on the MVar as an infinite wait. Which although true, it's useful to relay read messages and the connection will be closed by warp when the client disconects.
This should fix [#105]
1 parent8027c0f commit577a2f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/PostgresWebsockets/Middleware.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ wsApp Context {..} pendingConn =
111111
when (hasWrite mode)$
112112
notifySession conn sendNotification chs
113113

114-
waitForever<- newEmptyMVar
115-
void$ takeMVar waitForever
114+
void$ forever$ threadDelaymaxBound
116115

117116
-- Having both channel and claims as parameters seem redundant
118117
-- But it allows the function to ignore the claims structure and the source

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp