chore: Update checking socket in kernel notification function

Line 174: I add a checking for 'socket.user' before use attribute 'username'. Without this checking, it's will cause an error if socket doesn't have 'use' attribute.