Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sshpeer.py @ 46699:0738bc25d6ac
sshpeer: add a method to check if a doublepipe is closed
So we can tell in a next commit if we're trying to close an already
closed connection or not (in which case, we may warn).
Differential Revision: https://phab.mercurial-scm.org/D9996
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 15 Feb 2021 14:11:38 -0500 |
parents | 8c4906105f37 |
children | db8037e38085 |
comparison
equal
deleted
inserted
replaced
46698:8c4906105f37 | 46699:0738bc25d6ac |
---|---|
137 else: | 137 else: |
138 return meth(data) | 138 return meth(data) |
139 | 139 |
140 def close(self): | 140 def close(self): |
141 return self._main.close() | 141 return self._main.close() |
142 | |
143 @property | |
144 def closed(self): | |
145 return self._main.closed | |
142 | 146 |
143 def flush(self): | 147 def flush(self): |
144 return self._main.flush() | 148 return self._main.flush() |
145 | 149 |
146 | 150 |