Fixes Issue #2576 NPE when calling ip() on disconnected clients.

I went with the option of returning the ip address that was used when the connection was active.