Server snake abnormal behavior problem fixed and do some code concision.