Test for disconnection in case of process crash.

It still seems to properly close the connection which is weird. I
guess the kernel steps in to properly shutdown the connection.