added client connect/disconnect events back-port of issue #922