()
| 3740 | } |
| 3741 | |
| 3742 | function cleanupAndClose() { |
| 3743 | self.removeListener('upgrade', cleanupAndClose); |
| 3744 | self.removeListener('upgradeError', cleanupAndClose); |
| 3745 | close(); |
| 3746 | } |
| 3747 | |
| 3748 | function waitForUpgrade() { |
| 3749 | // wait for upgrade to finish since we can't send packets while pausing a transport |