diff src/ch/ethz/ssh2/Connection.java @ 339:cd1d87edcbf6 ganymed

fixed hang during connection, restore synchronized methods
author Carl Byington <carl@five-ten-sg.com>
date Thu, 31 Jul 2014 15:17:31 -0700
parents 5afb8c1a54b9
children b40bc65fa09a
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/Connection.java	Thu Jul 31 15:03:49 2014 -0700
+++ b/src/ch/ethz/ssh2/Connection.java	Thu Jul 31 15:17:31 2014 -0700
@@ -669,12 +669,12 @@
      * run forever.
      */
 
-    public void close() {
+    public synchronized void close() {
         Throwable t = new Throwable("Closed due to user request.");
         close(t, false);
     }
 
-    public void close(Throwable t, boolean hard) {
+    public synchronized void close(Throwable t, boolean hard) {
         if (cm != null) {
             cm.closeAllChannels();
         }