Fixed a to_python error.

Added support to reject connection requests.