@@ -864,11 +864,11 @@ handleConnectionRequest transport sock = handle tryCloseSocket $ do
864864 , _remoteIncoming = IntSet.empty
865865 , sendOn = sendMany sock
866866 }
867+ sendMany sock [encodeInt32 ConnectionRequestAccepted]
867868 -- TODO: this putMVar might block if the remote endpoint sends a
868869 -- connection request for a local endpoint that it is already
869870 -- connected to
870871 putMVar (remoteState theirEndPoint) (RemoteEndPointValid vst)
871− sendMany sock [encodeInt32 ConnectionRequestAccepted]
872872 return (Just theirEndPoint)
873873 -- If we left the scope of the exception handler with a return value of
874874 -- Nothing then the socket is already closed; otherwise, the socket has