transfer_socket: Don't perform checks if to==from

Change-Id: Ia9ba0cc40df3c7bc494ff445c3a0c2daaaf946c3