use on-socket-error