Skip to content

Commit d64f4c6

Browse files
committed
Remove bogus synchronization
1 parent 2510ccb commit d64f4c6

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/main/java/ch/ethz/ssh2/Connection.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -723,23 +723,6 @@ final class TimeoutState
723723
tm.setSoTimeout(connectTimeout);
724724
tm.setConnectionMonitors(connectionMonitors);
725725

726-
/* Make sure that the runnable below will observe the new value of "tm"
727-
* and "state" (the runnable will be executed in a different thread, which
728-
* may be already running, that is why we need a memory barrier here).
729-
* See also the comment in Channel.java if you
730-
* are interested in the details.
731-
*
732-
* OKOK, this is paranoid since adding the runnable to the todo list
733-
* of the TimeoutService will ensure that all writes have been flushed
734-
* before the Runnable reads anything
735-
* (there is a synchronized block in TimeoutService.addTimeoutHandler).
736-
*/
737-
738-
synchronized (tm)
739-
{
740-
/* We could actually synchronize on anything. */
741-
}
742-
743726
try
744727
{
745728
TimeoutToken token = null;

0 commit comments

Comments
 (0)