changeset 1741:623d9f62ab92

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 04 Nov 2022 10:03:12 -0600
parents c9c974817d0c
children d778f1f2598a
files src/goodjava/webserver/ServerSentEvents.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r c9c974817d0c -r 623d9f62ab92 src/goodjava/webserver/ServerSentEvents.java
--- a/src/goodjava/webserver/ServerSentEvents.java	Thu Nov 03 22:05:11 2022 -0600
+++ b/src/goodjava/webserver/ServerSentEvents.java	Fri Nov 04 10:03:12 2022 -0600
@@ -47,7 +47,13 @@
 					writer.write("\n\n");
 					writer.flush();
 				} catch(IOException e) {
+					//logger.info("removing con from "+url);
 					iter.remove();
+					try {
+						con.socket.close();
+					} catch(IOException e2) {
+						//logger.info("",e2);
+					}
 				}
 			}
 			if( cons.isEmpty() ) {