fix bug: fix db_session bug in on_close