fix termination of echoshared

Change-Id: Ida56ee62575a039c49d05909e6cb5ac59af08d33