Console was freezing because we read data from socket in blocking mode.
During reboot it was blocking infintely.
To fix issue, now we are reading data in non-blocking mode.
In non-blocking mode I set the timeout to 5 seconds.
The client renders RDP to a window created by Java. It is important for Hyper-V support,
because Hyper-V provides access to the consoles of VMs that it is running over RDP.