If a TCP write blocks for some reason (e.g. buffers reduced due to congestion control) then other threads cannot progress.
The method org.opends.server.replication.server.ReplicationServerDomain.processChangeTimeHeartbeatMsg(ServerHandler, ChangeTimeHeartbeatMsg) forwards HB messages while holding the lock which is risky.
I think that there are other cases where we write while holding the lock and they should be investigated as well. E.g: org.opends.server.replication.server.ReplicationServerDomain.receiveTopoInfoFromRS(TopologyMsg, ReplicationServerHandler, boolean)