fix crash cowboy when socket close