File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ const INDEX_HTML: &str = "index.html";
36
36
pub struct ServeSystem {
37
37
cfg : Arc < RtcServe > ,
38
38
watch : WatchSystem ,
39
- http_addr : String ,
39
+ /// The URL to open when starting
40
+ open_http_addr : String ,
40
41
shutdown_tx : broadcast:: Sender < ( ) > ,
41
42
// N.B. we use a broadcast channel here because a watch channel triggers a
42
43
// false positive on the first read of channel
@@ -60,11 +61,11 @@ impl ServeSystem {
60
61
None => IpAddr :: V4 ( Ipv4Addr :: LOCALHOST ) ,
61
62
} ;
62
63
let base = cfg. serve_base ( ) ?;
63
- let http_addr = format ! ( "{prefix}://{address}:{port}{base}" , port = cfg. port) ;
64
+ let open_http_addr = format ! ( "{prefix}://{address}:{port}{base}" , port = cfg. port) ;
64
65
Ok ( Self {
65
66
cfg,
66
67
watch,
67
- http_addr ,
68
+ open_http_addr ,
68
69
shutdown_tx : shutdown,
69
70
ws_state,
70
71
} )
@@ -84,7 +85,7 @@ impl ServeSystem {
84
85
85
86
// Open the browser.
86
87
if self . cfg . open {
87
- if let Err ( err) = open:: that ( self . http_addr ) {
88
+ if let Err ( err) = open:: that ( self . open_http_addr ) {
88
89
tracing:: error!( error = ?err, "error opening browser" ) ;
89
90
}
90
91
}
You can’t perform that action at this time.
0 commit comments