Fix warnings

Fix `warning: assigned but unused variable - sess_id`
Fix `warning: assigned but unused variable - pid`