mirror of
https://github.com/azlux/pymumble
synced 2024-11-23 13:56:26 +00:00
Compare commits
No commits in common. "ac3b6dee0c35841b6513bce740c2fe47d70673c4" and "1a455454e8edfaddca1ae0a4d51036b4066c95c8" have entirely different histories.
ac3b6dee0c
...
1a455454e8
@ -3,7 +3,7 @@
|
||||
import platform
|
||||
import sys
|
||||
|
||||
PYMUMBLE_VERSION = "1.6.1"
|
||||
PYMUMBLE_VERSION = "1.6"
|
||||
|
||||
# ============================================================================
|
||||
# Tunable parameters
|
||||
|
@ -144,17 +144,13 @@ class Mumble(threading.Thread):
|
||||
|
||||
def connect(self):
|
||||
"""Connect to the server"""
|
||||
try:
|
||||
# Get IPv4/IPv6 server address
|
||||
server_info = socket.getaddrinfo(self.host, self.port, type=socket.SOCK_STREAM)
|
||||
# Get IPv4/IPv6 server address
|
||||
server_info = socket.getaddrinfo(self.host, self.port, type=socket.SOCK_STREAM)
|
||||
|
||||
# Connect the SSL tunnel
|
||||
self.Log.debug("connecting to %s (%s) on port %i.", self.host, server_info[0][1], self.port)
|
||||
std_sock = socket.socket(server_info[0][0], socket.SOCK_STREAM)
|
||||
std_sock.settimeout(10)
|
||||
except socket.error:
|
||||
self.connected = PYMUMBLE_CONN_STATE_FAILED
|
||||
return self.connected
|
||||
# Connect the SSL tunnel
|
||||
self.Log.debug("connecting to %s (%s) on port %i.", self.host, server_info[0][1], self.port)
|
||||
std_sock = socket.socket(server_info[0][0], socket.SOCK_STREAM)
|
||||
std_sock.settimeout(10)
|
||||
|
||||
try:
|
||||
self.control_socket = ssl.wrap_socket(std_sock, certfile=self.certfile, keyfile=self.keyfile, ssl_version=ssl.PROTOCOL_TLS)
|
||||
|
Loading…
Reference in New Issue
Block a user