Mercurial > libervia-web
comparison src/server/server.py @ 472:42c8e91af048
server side: fixed start sequence when SERVICE_PROFILE is already connected
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 10 Jun 2014 16:02:43 +0200 |
parents | de039f008333 |
children | d1565906f228 |
comparison
equal
deleted
inserted
replaced
471:de039f008333 | 472:42c8e91af048 |
---|---|
1103 | 1103 |
1104 def initOk(dummy): | 1104 def initOk(dummy): |
1105 if not self.bridge.isConnected(C.SERVICE_PROFILE): | 1105 if not self.bridge.isConnected(C.SERVICE_PROFILE): |
1106 self.bridge.asyncConnect(C.SERVICE_PROFILE, self.passphrase, | 1106 self.bridge.asyncConnect(C.SERVICE_PROFILE, self.passphrase, |
1107 callback=self._startService, errback=eb) | 1107 callback=self._startService, errback=eb) |
1108 else: | |
1109 self._startService() | |
1108 | 1110 |
1109 self.initialised.addCallback(initOk) | 1111 self.initialised.addCallback(initOk) |
1110 | 1112 |
1111 def _startService(self, dummy): | 1113 def _startService(self, dummy=None): |
1112 """Actually start the HTTP(S) server(s) after the profile for Libervia is connected. | 1114 """Actually start the HTTP(S) server(s) after the profile for Libervia is connected. |
1113 @raise IOError: the certificate file doesn't exist | 1115 @raise IOError: the certificate file doesn't exist |
1114 @raise OpenSSL.crypto.Error: the certificate file is invalid | 1116 @raise OpenSSL.crypto.Error: the certificate file is invalid |
1115 """ | 1117 """ |
1116 if self.connection_type in ('https', 'both'): | 1118 if self.connection_type in ('https', 'both'): |