add master&monitor config for watcher

Change-Id: Ia0864abdabf1b1575f6b771d8edd185561946db2
check session before close

Change-Id: I11efda0ceef41cb1092fc8215990ac0570ddcc1a