fixed some socket disconnect from remote issues

Change-Id: I593a34ac56b2822bb06a5293db36317ed91f7f6f