Uncomment and adjust last tick code.

Still don't know what it does but this will be investigated later.
Remove TODO comment and add correct handling for client with exception sockets.