Revision db4e138b lib/http/server.py

b/lib/http/server.py
1 1
#
2 2
#
3 3

  
4
# Copyright (C) 2007, 2008 Google Inc.
4
# Copyright (C) 2007, 2008, 2010 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
33 33

  
34 34
from ganeti import http
35 35
from ganeti import utils
36
from ganeti import netutils
36 37

  
37 38

  
38 39
WEEKDAYNAME = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
......
478 479
    self.mainloop = mainloop
479 480
    self.local_address = local_address
480 481
    self.port = port
481

  
482
    self.socket = self._CreateSocket(ssl_params, ssl_verify_peer)
482
    family = netutils.IPAddress.GetAddressFamily(local_address)
483
    self.socket = self._CreateSocket(ssl_params, ssl_verify_peer, family)
483 484

  
484 485
    # Allow port to be reused
485 486
    self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

Also available in: Unified diff