[gsocks] clear queue before removing