diff --git a/MPW/Sync/MPW.rb b/MPW/Sync/MPW.rb index da72e43..054fa28 100644 --- a/MPW/Sync/MPW.rb +++ b/MPW/Sync/MPW.rb @@ -35,14 +35,12 @@ module MPW @password = password @suffix = suffix - begin - @socket = TCPSocket.new(host, port) - @enable = true - rescue Exception => e - @error_msg = "#{I18n.t('error.sync.connection')}\n#{e}" - @enable = false - end - + @socket = TCPSocket.new(host, port) + @enable = true + rescue Exception => e + @error_msg = "#{I18n.t('error.sync.connection')}\n#{e}" + @enable = false + else return @enable end