fix of InterfaceError: connection already closed