Implemented connection check.