Move event call to before state change since after state, the socket is invalid
Move event call to before state change since after state, the socket is invalid

elupus/autosar-tcpip-posix,elupus/autosar-tcpip-posix