better protection when calling a socket's getname() in the driver