*** GIOPConnection.java.orig Thu Oct 26 13:48:27 2006 --- GIOPConnection.java Mon Dec 11 15:24:34 2006 *************** *** 499,509 **** + "incorrect magic number --> connection closed" ); } ! // close transport connection, there is nearly no chance to sync ! // with peer on this connection again ! close(); ! ! // notify GIOPConnectionManager of close this.streamClosed(); return null; --- 499,506 ---- + "incorrect magic number --> connection closed" ); } ! //close transport connection, there is nearly no chance to sync with ! //peer on this connection again this.streamClosed(); return null; *************** *** 987,998 **** { if (logger.isErrorEnabled()) { ! logger.error( "GIOP connection closed due to errors during sendMessage"); } ! //close transport connection, there is nearly no chance to sync with ! //peer on this connection again ! close(); ! //signal GIOPConnectionManager to throw this connection away this.streamClosed(); } throw e; --- 984,1000 ---- { if (logger.isErrorEnabled()) { ! logger.error( "Underlying transport connection closed due to errors during sendMessage"); } ! //release write lock to prevent dead locks to ! //reader thread which might try to close this socket too ! //concurrently (unfortunately write lock is requested during streamClosed()) ! releaseWriteLock(); ! //close transport connection, ! //error during write indicate heavy problems with current connection, ! //it makes no sense to use this transport any longer ! //examples: firewall dropped connection silently, ! // socket system buffers full (peer didnt read data in time) this.streamClosed(); } throw e;