only set no_delay on TCP sockets
otherwise and exception is thrown on when connecting to unix_socket ([Errno 95] Operation not supported).
This commit is contained in:
		| @@ -839,10 +839,10 @@ class Connection(object): | ||||
|                         raise | ||||
|                 self.host_info = "socket %s:%d" % (self.host, self.port) | ||||
|                 if DEBUG: print('connected using socket') | ||||
|                 if self.no_delay: | ||||
|                     sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | ||||
|             sock.settimeout(None) | ||||
|             sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) | ||||
|             if self.no_delay: | ||||
|                 sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | ||||
|             self.socket = sock | ||||
|             self._rfile = _makefile(sock, 'rb') | ||||
|             self._get_server_information() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Black
					Daniel Black