Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ability to close and restore streaming server #1547

Merged
merged 2 commits into from Jun 11, 2019

Conversation

@untitledlt
Copy link
Contributor

untitledlt commented Nov 22, 2018

Added ability to restore steaming server by calling .listen(port) on existing server which was closed before with .close()

registered issue: #1545

@request-info

This comment has been minimized.

Copy link

request-info bot commented Nov 22, 2018

👋 We would appreciate it if you could provide us with more information about this issue.

@welcome

This comment has been minimized.

Copy link

welcome bot commented Nov 22, 2018

🙌 Thanks for opening this pull request! You're awesome.

@stale

This comment has been minimized.

Copy link

stale bot commented Apr 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Apr 7, 2019
closed = false
server.on('connection', onConnection)
server.on('request', onRequest)
_listen.call(server, port)

This comment has been minimized.

Copy link
@alxhotel

alxhotel Apr 7, 2019

Member

In order to make this compatible and pass the tests, it should be changed to:

server.listen = (...args) => {
  ...
  _listen.apply(server, args)
}
@@ -25,7 +30,6 @@ function Server (torrent, opts = {}) {
const onReady = pendingReady.pop()
torrent.removeListener('ready', onReady)
}
torrent = null

This comment has been minimized.

Copy link
@alxhotel

alxhotel Apr 7, 2019

Member

Move torrent = null inside server.destroy(cb).

@stale stale bot removed stale labels Apr 7, 2019
@untitledlt untitledlt force-pushed the untitledlt:close-restore branch 2 times, most recently from 8f5ade2 to 9f69f97 May 20, 2019
@untitledlt

This comment has been minimized.

Copy link
Contributor Author

untitledlt commented May 21, 2019

@alxhotel please see updated PR

@untitledlt

This comment has been minimized.

Copy link
Contributor Author

untitledlt commented Jun 11, 2019

@alxhotel @DiegoRBaquero any chance to get this merged any time soon?

@untitledlt untitledlt force-pushed the untitledlt:close-restore branch from 9f69f97 to 5dc293f Jun 11, 2019
@DiegoRBaquero DiegoRBaquero merged commit d7eeee2 into webtorrent:master Jun 11, 2019
3 checks passed
3 checks passed
WIP Ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@welcome

This comment has been minimized.

Copy link

welcome bot commented Jun 11, 2019

🎉 Congrats on getting your first pull request landed!

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

DiegoRBaquero commented Jun 11, 2019

Do you need this published to npm?

@untitledlt

This comment has been minimized.

Copy link
Contributor Author

untitledlt commented Jun 12, 2019

Sure. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.