Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 08ffc98

Browse files
committed
[CDEC-356] Keep sendLoop tail recursive
1 parent a94fd6c commit 08ffc98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

networking/src/Ntp/Client.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ sendLoop cli addrs = do
186186
cmd <- timeout poll (wait a)
187187
case cmd of
188188
Nothing -> cancel a
189-
Just SendRequest
190-
-> sendLoop cli addrs
189+
Just _ -> return ()
191190
)
192191

193192
-- reset state & status before next loop
194193
atomically $ writeTVar (ncState cli) []
195194
atomically $ writeTVar (ncStatus cli) NtpSyncPending
195+
196196
sendLoop cli addrs
197197

198198
where

0 commit comments

Comments
 (0)