Update socket.php

Another fix for #461