fix client side socket already in use issue