he thought he recognised him straightaway , but before he had the chance to put a name to the face , the captain had already thrust his arms around his shoulders and was hugging him like a lost child .