fix 'address null' exception when close in client mode after client lost connection with server