Factor out handling of new connection to reduce complexity.
Factor out handling of new connection to reduce complexity.

mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet