socket shutdown with thread killer

I noticed spinning threads (ie: using read-line) will execute indefinitely and thus should be shut down, this is a fix to send socket reference as well terminates thread when socket is closed.