Guodian: fix socket write