Skip to content

Commit

Permalink
rtt
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Jan 26, 2024
1 parent 4f586ba commit 80136f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/Network/TLS/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ handshake ctx = do
Just dat -> modifyTLS13State ctx $ \st -> st{tls13stPendingRecvData = Just dat}

rttFactor :: Int
rttFactor = 2
rttFactor = 3

getRTT :: Context -> IO Int
getRTT ctx = do
Expand Down
1 change: 1 addition & 0 deletions core/Network/TLS/Handshake/Common13.hs
Original file line number Diff line number Diff line change
Expand Up @@ -586,4 +586,5 @@ setRTT ctx t0 = do
t1 <- getUnixTime
let UnixDiffTime (CTime s) u = t1 `diffUnixTime` t0
rtt = fromIntegral s * 1000000 + fromIntegral u
when (rtt == 0) $ throwCore $ Error_Misc "RTT is 0"
modifyTLS13State ctx $ \st -> st{tls13stRTT = rtt}

0 comments on commit 80136f0

Please sign in to comment.