Hi,Niranjan. I modify the code and build it. Before I modify the code ,when closing the socket, the exception information occurs every minute(for there is sentence:Thread.sleep(1000);). Now the exception information occurs just once. It is acceptable I think.
Maybe the exception is inevitable if I close the socket,because the sentence "s = theServer.accept();" will suspend to wait for and accept next connection in the while loop. So when socket is closed, it would throw exception. Best Regards Yu ----- Just Do It ! -- View this message in context: http://www.nabble.com/How-can-I-stop-HL7Server---I-start-it-in-a-new-thread%2Cbut-I-can-not-stop-it.-tp24365555p25271683.html Sent from the hl7api-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Hl7api-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hl7api-devel

