Description
Now we can find RPC (port 6667) can be closed normally in Travis CI but the sync module sometimes can not be closed.
Then the Travis CI may fail like:
I checked the codes and find little difference between RPC service and SyncManager.
So, abstract them to reduce duplicate codes and let SyncManager be as stable as RPC (in the test stage) is the goal of this issue.