fix calling socket emit method for local event