On 1 June, she was sent to relieve the light cruiser on the Denmark Strait patrol route. After an uneventful assignment, she was ordered to cover another Middle East-bound convoy, WS 9B, and docked in Gibraltar again in early July. Later that month, "Edinburgh" took part in Operation Substance, arriving in Malta on 24 July. The next day, she had a close call when a German torpedo bomber attacked her. However, the ship sustained no damage, and continued on her course back to the Clyde.