close the connecting window in case of an error

Signed-off-by: aurel <aurel.savoiu@cti.pub.ro>