save before change socket connection
fix socket connection