mirror of
https://github.com/azlux/pymumble
synced 2024-11-23 13:56:26 +00:00
Compare commits
3 Commits
1a455454e8
...
ac3b6dee0c
Author | SHA1 | Date | |
---|---|---|---|
ac3b6dee0c | |||
4047e4ade5 | |||
|
738b479bc0 |
@ -3,7 +3,7 @@
|
|||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
PYMUMBLE_VERSION = "1.6"
|
PYMUMBLE_VERSION = "1.6.1"
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Tunable parameters
|
# Tunable parameters
|
||||||
|
@ -144,6 +144,7 @@ class Mumble(threading.Thread):
|
|||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
"""Connect to the server"""
|
"""Connect to the server"""
|
||||||
|
try:
|
||||||
# Get IPv4/IPv6 server address
|
# Get IPv4/IPv6 server address
|
||||||
server_info = socket.getaddrinfo(self.host, self.port, type=socket.SOCK_STREAM)
|
server_info = socket.getaddrinfo(self.host, self.port, type=socket.SOCK_STREAM)
|
||||||
|
|
||||||
@ -151,6 +152,9 @@ class Mumble(threading.Thread):
|
|||||||
self.Log.debug("connecting to %s (%s) on port %i.", self.host, server_info[0][1], self.port)
|
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 = socket.socket(server_info[0][0], socket.SOCK_STREAM)
|
||||||
std_sock.settimeout(10)
|
std_sock.settimeout(10)
|
||||||
|
except socket.error:
|
||||||
|
self.connected = PYMUMBLE_CONN_STATE_FAILED
|
||||||
|
return self.connected
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.control_socket = ssl.wrap_socket(std_sock, certfile=self.certfile, keyfile=self.keyfile, ssl_version=ssl.PROTOCOL_TLS)
|
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