-terminate automake session when project is disposed

-server side: cancel compile session when connection is closed
This commit is contained in:
Eugene Zhuravlev
2012-02-01 12:08:30 +01:00
parent a71f762de7
commit 0fdd32231e
2 changed files with 32 additions and 12 deletions
@@ -673,6 +673,9 @@ public class CompileServerManager implements ApplicationComponent{
@Override
public boolean handleBuildEvent(JpsRemoteProto.Message.Response.BuildEvent event) {
if (myProject.isDisposed()) {
return true;
}
switch (event.getEventType()) {
case BUILD_COMPLETED:
if (event.hasCompletionStatus()) {
@@ -696,6 +699,9 @@ public class CompileServerManager implements ApplicationComponent{
@Override
public void handleCompileMessage(JpsRemoteProto.Message.Response.CompileMessage compileResponse) {
if (myProject.isDisposed()) {
return;
}
final JpsRemoteProto.Message.Response.CompileMessage.Kind kind = compileResponse.getKind();
if (kind == JpsRemoteProto.Message.Response.CompileMessage.Kind.ERROR) {
informWolf(myProject, compileResponse);