Removed Reconnection Cycle while connected
Removed Duplicate Code