Added timeout disconnecting and intentional disconnecting.
More disconnect fixes.