Ready socket now using by reference
Fix little memory leak