dont cancel when we cant bind to port. Fixes #7173
This commit is contained in:
parent
b050e63b60
commit
2b8890bf51
|
@ -22,7 +22,6 @@
|
||||||
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import hashlib
|
import hashlib
|
||||||
|
@ -98,13 +97,6 @@ class SocksQueue:
|
||||||
fingerprint=fingerprint)
|
fingerprint=fingerprint)
|
||||||
self.listener.queue = self
|
self.listener.queue = self
|
||||||
self.listener.bind()
|
self.listener.bind()
|
||||||
if self.listener.started is False:
|
|
||||||
self.listener = None
|
|
||||||
# We cannot bind port, call error callback and fail
|
|
||||||
self.error_cb(_('Unable to bind to port %s.') % port,
|
|
||||||
_('Maybe you have another running instance of Gajim. File '
|
|
||||||
'Transfer will be cancelled.'))
|
|
||||||
return None
|
|
||||||
else:
|
else:
|
||||||
# There is already a listener, we update the file's information
|
# There is already a listener, we update the file's information
|
||||||
# on the new connection.
|
# on the new connection.
|
||||||
|
@ -1473,7 +1465,7 @@ class Socks5Listener(IdleObject):
|
||||||
self.ai = None
|
self.ai = None
|
||||||
continue
|
continue
|
||||||
if not self.ai:
|
if not self.ai:
|
||||||
# unable to bind, show error dialog
|
log.error('unable to bind to port ' + str(self.port))
|
||||||
return None
|
return None
|
||||||
self._serv.listen(socket.SOMAXCONN)
|
self._serv.listen(socket.SOMAXCONN)
|
||||||
self._serv.setblocking(False)
|
self._serv.setblocking(False)
|
||||||
|
|
Loading…
Reference in New Issue