can you give us a little more code and details ?
It doesn't look that hard to me:
ois.close(); {

} a Socket is just a file, from some definitions. A file is an ordered sequence of bytes. If you call close() on anything anywhere, it may propogate up the inheritance or something.
In other words, it could be that your close is closing the file.
You generally have a method accept(), that is hardcoded into the underlying machine and that has to be written on the assumption that threads will keep running into your application at that point, and you pass them off quickly - usually by calling new on something, and return as soon as possible, so that that
thread that called accept() does not get crossways with other stuff or hang up or something.
There is also quite a lot of hardwiring that gets into issues like Socket.keepAlive or something .... we will have to see some more of this to avoid lengthy speculation that does not have any effect on your problem domain.
[ September 18, 2007: Message edited by: Nicholas Jordan ]