Bug fix. I think this fixed a long standing bug in the brainstorm web server.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
|
||||
<stringAttribute key="org.eclipse.ant.ui.ATTR_BUILD_SCOPE" value="${none}"/>
|
||||
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
|
||||
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
@@ -15,6 +15,8 @@
|
||||
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Foundation Builder"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:\Foundation Builder\builder\build.xml}"/>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<target name="release-compile" depends="make-dirs">
|
||||
<mkdir dir="${archives}/release-bin"/>
|
||||
|
||||
<javac destdir="${archives}/release-bin" executable="c:/java/jdk1.5/bin/javac" encoding="utf-8" nowarn="true" verbose="no" fork="true" classpath="${swt-releases}/win32-win32-x86/swt.jar;${orb-exception-support};${workspace}/Foundation TCV SWT Client Application/proxies;">
|
||||
<javac destdir="${archives}/release-bin" executable="c:/java/jdk1.7/bin/javac" encoding="utf-8" nowarn="true" verbose="no" fork="true" classpath="${swt-releases}/win32-win32-x86/swt.jar;${orb-exception-support};${workspace}/Foundation TCV SWT Client Application/proxies;">
|
||||
<src path="${workspace}/Common/src"/>
|
||||
<src path="${workspace}/Class File Services/src"/>
|
||||
<src path="${workspace}/Orb/src"/>
|
||||
|
||||
@@ -95,6 +95,14 @@ protected abstract void passThrough(ByteBuffer buffer);
|
||||
* Closes the socket context and cleans up.
|
||||
*/
|
||||
protected abstract void close();
|
||||
/**
|
||||
* Determines whether the socket context has been closed.
|
||||
* Should synchronize on getLock() prior to calling this.
|
||||
* @return Whether the socket context is closed.
|
||||
*/
|
||||
protected boolean isClosed() {
|
||||
return !(key != null && key.channel().isOpen());
|
||||
}//isClosed()//
|
||||
/**
|
||||
* Gets the socket context related to this one (when two are tied together such that data from one immediately is sent to the other).
|
||||
* @return The related socket context, or null if none exists (data not forwarded to a remote server).
|
||||
|
||||
@@ -249,4 +249,10 @@ protected synchronized void close() {
|
||||
protected boolean hasPendingWrite() {
|
||||
return currentOutboundMessage != null;
|
||||
}//hasPendingWrite()//
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString() {
|
||||
return "PassThroughSocketContext: " + (relatedSocketContext != null ? relatedSocketContext.toString() : "null");
|
||||
}//toString()//
|
||||
}//PassThroughSocketContext//
|
||||
@@ -325,8 +325,9 @@ protected void writeOutgoingMessages() throws IOException {
|
||||
|
||||
//Synchronized to avoid multiple threads accessing the currentOutboundMessage chain at one time.//
|
||||
synchronized(getLock()) {
|
||||
if(!isClosed()) {
|
||||
if(currentOutboundMessage != outboundMessage) {
|
||||
Debug.log(new RuntimeException("Cannot change the currentOutboundMessage while we are sending it!"));
|
||||
Debug.log(new RuntimeException("Cannot change the currentOutboundMessage while we are sending it! {" + toString() + "}"));
|
||||
}//if//
|
||||
|
||||
//If we finished the message then load the next message, otherwise flag that we need to stop sending (buffers full - flag a write on the socket's key and wait).//
|
||||
@@ -352,6 +353,11 @@ protected void writeOutgoingMessages() throws IOException {
|
||||
Debug.log(this.getId() + "|" + System.nanoTime() + "|The sent message was only partially sent, stop sending for now.");
|
||||
}//if//
|
||||
|
||||
keepSending = false;
|
||||
}//else//
|
||||
}//if//
|
||||
else {
|
||||
Debug.log(this.getId() + "|" + System.nanoTime() + "|Socket closed.");
|
||||
keepSending = false;
|
||||
}//else//
|
||||
}//synchronized//
|
||||
@@ -2245,6 +2251,6 @@ private int indexOf(byte[] source, byte[] pattern, int fromOffset) {
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString() {
|
||||
return "Domain: " + domain + "; SSL: " + (sslEngine != null) + "; Websocket: " + isWebsocket;
|
||||
return "SocketContext: Domain: " + domain + "; SSL: " + (sslEngine != null) + "; Websocket: " + isWebsocket;
|
||||
}//toString()//
|
||||
}//SocketContext//
|
||||
Reference in New Issue
Block a user