Skip to content

Commit 3f510cc

Browse files
committed
roll back RCP "cleanup"
1 parent 63789d0 commit 3f510cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Simplex/RemoteControl/Client.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ connectRCCtrl_ drg pairing'@RCCtrlPairing {caKey, caCert} inv@RCInvitation {ca,
281281
TLS.Credentials (creds : _) -> pure $ Just creds
282282
_ -> throwE $ RCEInternal "genTLSCredentials must generate credentials"
283283
let clientConfig = defaultTransportClientConfig {clientCredentials}
284-
ExceptT . runTransportClient clientConfig Nothing host (show port) (Just ca) $ \tls -> runExceptT $ do
284+
ExceptT . runTransportClient clientConfig Nothing host (show port) (Just ca) $ \tls@TLS {tlsBuffer, tlsContext} -> runExceptT $ do
285+
-- pump socket to detect connection problems
286+
liftIO $ peekBuffered tlsBuffer 100000 (TLS.recvData tlsContext) >>= logDebug . tshow -- should normally be ("", Nothing) here
285287
logDebug "Got TLS connection"
286288
r' <- newEmptyTMVarIO
287289
whenM (atomically $ tryPutTMVar r $ Right (tlsUniq tls, tls, r')) $ do

0 commit comments

Comments
 (0)