JDWP: attempt to fix failure on closed connection

Don't send packet if JDWP connection has been closed while
processing a JDWP command.

We used to DCHECK(IsConnected()) in JdwpNetStateBase::WritePacket
but this is wrong when the connection has been closed by the debugger
(client) before we sent the packet. It seems to happen more during
JDWP tests due to how debugger and debuggee are synchronizing with
each other.

Bug: 22907762
Change-Id: I1c886382268697b4c50755b6009cceac7b8d656e
1 file changed