Bugfix: lock in DoSendQueuedFrames was unlocked by foreign threads