refactoring code, check connection in Listener. refer to Bug #943031
refactoring code, check connection in Listener. refer to Bug #943031

Change-Id: Ic04d1a918fedd5fd71f58af8e27b58deef070ee2

n0ano/gantt,n0ano/gantt