()
| 4469 | } |
| 4470 | |
| 4471 | function cleanupAndClose () { |
| 4472 | self.removeListener('upgrade', cleanupAndClose); |
| 4473 | self.removeListener('upgradeError', cleanupAndClose); |
| 4474 | close(); |
| 4475 | } |
| 4476 | |
| 4477 | function waitForUpgrade () { |
| 4478 | // wait for upgrade to finish since we can't send packets while pausing a transport |