Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: serversocket Date: Sat, 14 Jul 2012 14:12:22 -0700 Organization: albasani.net Lines: 53 Message-ID: References: <15b1bc5d-160d-4048-8ad7-2cff9cf862e0@googlegroups.com> <76cf48db-123d-4888-ac60-4b80ccfdeea4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net 66D48YFkdBxNR1osyQqqBnmtykUyrkMSae1KzJUcqnSVSRVs78kTFtgZvQ+xYz8YeEUPa0gHPv6/8U/ZWE4taHRme12RB5afndDH0hmExAcMzgq1o32Vv2unkI3gd8DY NNTP-Posting-Date: Sat, 14 Jul 2012 21:11:47 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="UuQPbqT+8LZDfDtB1Bc6lrly2FHrfcLYdii9Eyt+mEbMWy8ucvhoo/b6LgiwXi/qMPabo7NhncE/e5NKKF5XHRxSqEzOS57VCfaEMZqi0VOzEqUbcWJb2i/7Ea+bs5Hb"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: Cancel-Lock: sha1:x2A+sh/FaiXJLmInhUujQo8Fpg0= Xref: csiph.com comp.lang.java.programmer:16028 Lew wrote: ... [snip] ... > /* Track > * $RCSfile$ > */ > package eegee; ... > public class Track > { ... > private static void serveConnections(ServerSocket serverSocket) > { > while (true) > { > final Socket connectionSocket; > try > { > connectionSocket = serverSocket.accept(); > } > catch (IOException exc) > { > logger.error(BAD_CONNECT, exc); > return; > } > assert connectionSocket != null; > > try > { > handleClient(connectionSocket); > } > finally > { > close(connectionSocket); > } > } > } ... I made a mistake in the 'serveConnections()' method, arguably. Or maybe it isn't a mistake. What do you think; is it a mistake or not? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg