[Pkg-owncloud-commits] [owncloud-client] 26/115: nautilus overlay: Fix reconnect, create a new socket everytime.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Aug 29 22:03:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit f6d20cbe55ee489cab46c11cbee987f9b2300c94
Author: Klaas Freitag <freitag at owncloud.com>
Date: Thu Aug 14 11:07:20 2014 +0200
nautilus overlay: Fix reconnect, create a new socket everytime.
---
shell_integration/nautilus/ownCloud.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/shell_integration/nautilus/ownCloud.py b/shell_integration/nautilus/ownCloud.py
index 819cf03..9c5dc1f 100755
--- a/shell_integration/nautilus/ownCloud.py
+++ b/shell_integration/nautilus/ownCloud.py
@@ -15,7 +15,6 @@ class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoP
watch_id = 0
def __init__(self):
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.connectToOwnCloud
if not self.connected:
# try again in 5 seconds - attention, logic inverted!
@@ -23,12 +22,15 @@ class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoP
def connectToOwnCloud(self):
try:
+ self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
self.sock.connect(("localhost", 33001))
self.sock.settimeout(5)
self.connected = True
self.watch_id = GObject.io_add_watch(self.sock, GObject.IO_IN, self.handle_notify)
except:
print "Connect could not be established, try again later!"
+ self.sock.close()
return not self.connected
def sendCommand(self, cmd):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list