re-init tcp server when encounter EBADF

on ios, if you lock screen for a while, then re-open, may encounter the EBADF erron of tcp listen socket accept() call and will dead loop forever with ECONNABORTED errno after the first EBADF error.

this commit fix this and make the tcp-server reinit when EBADF errno catched.