let close_doc_request_connections (wr: win_ref) (b: b)
  : b =
    assert (win_valid wr b);
    let not_for_wr (_, _, dst) =
      begin match dst with
      | Doc_dst(wr') -> wr' <> wr
      | _ -> true
      end
    in
    let connections' = List.filter not_for_wr b.browser_connections in
    { b with browser_connections = connections' }