fix bug: fix socket.on_close bug