Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit80eb286

Browse files
authored
Bind the HTTPServer in start (#6061)
Binding sockets hooks them up to the running eventloop, which we should try to avoid in initializein case any other stages may configure the event loop policy
1 parentc1101de commit80eb286

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎notebook/notebookapp.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,12 +1792,6 @@ def init_webapp(self):
17921792
max_body_size=self.max_body_size,
17931793
max_buffer_size=self.max_buffer_size)
17941794

1795-
success=self._bind_http_server()
1796-
ifnotsuccess:
1797-
self.log.critical(_('ERROR: the notebook server could not be started because '
1798-
'no available port could be found.'))
1799-
self.exit(1)
1800-
18011795
def_bind_http_server(self):
18021796
returnself._bind_http_server_unix()ifself.sockelseself._bind_http_server_tcp()
18031797

@@ -2297,6 +2291,12 @@ def start(self):
22972291
self.log.critical(_("Running as root is not recommended. Use --allow-root to bypass."))
22982292
self.exit(1)
22992293

2294+
success=self._bind_http_server()
2295+
ifnotsuccess:
2296+
self.log.critical(_('ERROR: the notebook server could not be started because '
2297+
'no available port could be found.'))
2298+
self.exit(1)
2299+
23002300
info=self.log.info
23012301
forlineinself.notebook_info(kernel_count=False).split("\n"):
23022302
info(line)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp