()
| 757 | } |
| 758 | |
| 759 | function cleanupAndClose() { |
| 760 | self.removeListener('upgrade', cleanupAndClose); |
| 761 | self.removeListener('upgradeError', cleanupAndClose); |
| 762 | close(); |
| 763 | } |
| 764 | |
| 765 | function waitForUpgrade() { |
| 766 | // wait for upgrade to finish since we can't send packets while pausing a transport |