File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
app/Livewire/Server/Proxy Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function traefikDashboardAvailable(bool $data)
50
50
public function proxyStarted ()
51
51
{
52
52
CheckProxy::run ($ this ->server , true );
53
- $ this ->dispatch ('success ' , ' Proxy started. ' );
53
+ $ this ->dispatch ('proxyStatusUpdated ' );
54
54
}
55
55
56
56
public function proxyStatusUpdated ()
@@ -61,7 +61,7 @@ public function proxyStatusUpdated()
61
61
public function restart ()
62
62
{
63
63
try {
64
- $ this ->stop ();
64
+ $ this ->stop (forceStop: false );
65
65
$ this ->dispatch ('checkProxy ' );
66
66
} catch (\Throwable $ e ) {
67
67
return handleError ($ e , $ this );
@@ -91,7 +91,7 @@ public function startProxy()
91
91
}
92
92
}
93
93
94
- public function stop ()
94
+ public function stop (bool $ forceStop = true )
95
95
{
96
96
try {
97
97
if ($ this ->server ->isSwarm ()) {
@@ -104,7 +104,7 @@ public function stop()
104
104
], $ this ->server );
105
105
}
106
106
$ this ->server ->proxy ->status = 'exited ' ;
107
- $ this ->server ->proxy ->force_stop = true ;
107
+ $ this ->server ->proxy ->force_stop = $ forceStop ;
108
108
$ this ->server ->save ();
109
109
$ this ->dispatch ('proxyStatusUpdated ' );
110
110
} catch (\Throwable $ e ) {
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ class Status extends Component
16
16
17
17
public int $ numberOfPolls = 0 ;
18
18
19
- protected $ listeners = ['proxyStatusUpdated ' => '$refresh ' , 'startProxyPolling ' ];
19
+ protected $ listeners = [
20
+ 'proxyStatusUpdated ' ,
21
+ 'startProxyPolling ' ,
22
+ ];
20
23
21
24
public function startProxyPolling ()
22
25
{
You can’t perform that action at this time.
0 commit comments