import socket


def is_server_running(host, port):
    """
    Checks whether a server is currently listening on the specified
    host and port.
    """
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        return s.connect_ex((host, port)) == 0
    finally:
        s.close()