Added synch for the connection event and additional configuration option for the connection timeout