Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 228888 Details for
Bug 404082
[dstore] race condition on finish, removing senders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch to not lock in removeSenders
patch.txt (text/plain), 2.25 KB, created by
David McKnight
on 2013-03-21 17:04:57 EDT
(
hide
)
Description:
patch to not lock in removeSenders
Filename:
MIME Type:
Creator:
David McKnight
Created:
2013-03-21 17:04:57 EDT
Size:
2.25 KB
patch
obsolete
>diff --git a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java >index 92f2739..724751b 100644 >--- a/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java >+++ b/rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/internal/core/server/ServerUpdateHandler.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2012 IBM Corporation and others. >+ * Copyright (c) 2002, 2013 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -17,6 +17,7 @@ > * David McKnight (IBM) [246826][dstore] KeepAlive does not work correctly > * David McKnight (IBM) - [358301] [DSTORE] Hang during debug source look up > * David McKnight (IBM) [388873][dstore] ServerUpdateHandler _senders list should be synchronized >+ * David McKnight (IBM) [404082][dstore] race condition on finish, removing senders > *******************************************************************************/ > > package org.eclipse.dstore.internal.core.server; >@@ -352,19 +353,17 @@ > */ > public void removeSenderWith(Socket socket) > { >- synchronized (_senders){ >- for (int i = 0; i < _senders.size(); i++) >+ for (int i = 0; i < _senders.size(); i++) >+ { >+ Sender sender = (Sender) _senders.get(i); >+ if (sender.socket() == socket) > { >- Sender sender = (Sender) _senders.get(i); >- if (sender.socket() == socket) >- { >- // sender sends last ack before death >- DataElement document = _dataStore.createObject(null, DataStoreResources.DOCUMENT_TYPE, "exit", "exit"); //$NON-NLS-1$ //$NON-NLS-2$ >- sender.sendDocument(document, 2); >- removeSender(sender); >- } >+ // sender sends last ack before death >+ DataElement document = _dataStore.createObject(null, DataStoreResources.DOCUMENT_TYPE, "exit", "exit"); //$NON-NLS-1$ //$NON-NLS-2$ >+ sender.sendDocument(document, 2); >+ removeSender(sender); > } >- } >+ } > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 404082
:
228888
|
245038