Fixed self bug in socketEndpoint