Closing temporary socket