Finally finish socket connection.