also handle the case that disconnect is called before the connection is
open