blocking pending messages fixes xhr and ws