A socket includes a first section and a second section which formed at the first end of the first section. The first section includes multiple side faces located on the outside thereof, and a corner portion is formed between each of two adjacent side faces. At least one of the corner portions includes a recess defined therein, and a resilient positioning unit is located in the recess and partially protrudes beyond the open end of the recess. A passage is defined axially through the first and second sections. The resilient positioning unit in the at least one of the corner portions does not affect the feature to secure the socket to the wrench.