diff --git a/clightning/clightning.go b/clightning/clightning.go
index 4c5c1086..3b598fa7 100644
--- a/clightning/clightning.go
+++ b/clightning/clightning.go
@@ -136,6 +136,7 @@ func NewClightningClient(ctx context.Context) (*ClightningClient, <-chan interfa
 		return nil, nil, err
 	}
 	cl.Plugin.SubscribeConnect(cl.OnConnect)
+	cl.Plugin.SubscribeShutdown(cl.OnShutdown)
 
 	cl.glightning = glightning.NewLightning()
 	cl.glightning.SetTimeout(40)
@@ -352,7 +353,7 @@ func (cl *ClightningClient) SetPeerswapConfig(config *Config) {
 		LiquidRpcHost:          config.Liquid.RpcHost,
 		LiquidRpcPort:          config.Liquid.RpcPort,
 		LiquidRpcWallet:        config.Liquid.RpcWallet,
-		LiquidSwaps:          *config.Liquid.LiquidSwaps,
+		LiquidSwaps:            *config.Liquid.LiquidSwaps,
 		PeerswapDir:            config.PeerswapDir,
 	}
 	if config.LWK != nil {
@@ -547,6 +548,10 @@ func (cl *ClightningClient) OnConnect(connectEvent *glightning.ConnectEvent) {
 	}()
 }
 
+func (cl *ClightningClient) OnShutdown() {
+	cl.Plugin.Stop()
+}
+
 // RegisterMethods registeres rpc methods to c-lightning
 func (cl *ClightningClient) RegisterMethods() error {
 	for _, v := range methods {
diff --git a/go.mod b/go.mod
index ce14fd2c..390bc448 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
 	github.com/btcsuite/btcd/btcutil v1.1.2
 	github.com/btcsuite/btcd/btcutil/psbt v1.1.5
 	github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
-	github.com/elementsproject/glightning v0.0.0-20240224063423-55240d61b52a
+	github.com/elementsproject/glightning v0.0.0-20241118233744-055205379e1d
 	github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
 	github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
 	github.com/jessevdk/go-flags v1.5.0
diff --git a/go.sum b/go.sum
index ea24d6c8..8422f012 100644
--- a/go.sum
+++ b/go.sum
@@ -190,6 +190,10 @@ github.com/dvyukov/go-fuzz v0.0.0-20220726122315-1d375ef9f9f6 h1:sE4tvxWw01v7K3M
 github.com/dvyukov/go-fuzz v0.0.0-20220726122315-1d375ef9f9f6/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
 github.com/elementsproject/glightning v0.0.0-20240224063423-55240d61b52a h1:xnVQmVqGmSs3m8zPQF4iYEYiUAmJx8MlT9vJ3lAaOjc=
 github.com/elementsproject/glightning v0.0.0-20240224063423-55240d61b52a/go.mod h1:YAdIeSyx8VEhDCtEaGOJLmWNpPaQ3x4vYSAj9Vrppdo=
+github.com/elementsproject/glightning v0.0.0-20240922021749-3b572176aa14 h1:Q23txNJKtdTSXDoN4wF72bopQ0F0RyEkWL3nnoxfV/w=
+github.com/elementsproject/glightning v0.0.0-20240922021749-3b572176aa14/go.mod h1:YAdIeSyx8VEhDCtEaGOJLmWNpPaQ3x4vYSAj9Vrppdo=
+github.com/elementsproject/glightning v0.0.0-20241118233744-055205379e1d h1:FVMwlIlOdhe4/eORWS8Gu9M+BtZscx0X6Qg6aeRzMWs=
+github.com/elementsproject/glightning v0.0.0-20241118233744-055205379e1d/go.mod h1:YAdIeSyx8VEhDCtEaGOJLmWNpPaQ3x4vYSAj9Vrppdo=
 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
diff --git a/test/bitcoin_cln_test.go b/test/bitcoin_cln_test.go
index 07251459..efa01b3a 100644
--- a/test/bitcoin_cln_test.go
+++ b/test/bitcoin_cln_test.go
@@ -1218,3 +1218,33 @@ func Test_ClnCln_StuckChannels(t *testing.T) {
 	err := lightningds[1].Rpc.Request(&clightning.SwapIn{SatAmt: 100, ShortChannelId: params.scid, Asset: "btc"}, &response)
 	assert.Error(t, err)
 }
+
+func Test_Cln_shutdown(t *testing.T) {
+	IsIntegrationTest(t)
+	t.Parallel()
+	require := require.New(t)
+	bitcoind, lightningds, _ := clnclnSetup(t, uint64(math.Pow10(9)))
+	defer func() {
+		if t.Failed() {
+			filter := os.Getenv("PEERSWAP_TEST_FILTER")
+			pprintFail(
+				tailableProcess{
+					p:     bitcoind.DaemonProcess,
+					lines: defaultLines,
+				},
+				tailableProcess{
+					p:      lightningds[0].DaemonProcess,
+					filter: filter,
+					lines:  defaultLines,
+				},
+				tailableProcess{
+					p:     lightningds[1].DaemonProcess,
+					lines: defaultLines,
+				},
+			)
+		}
+	}()
+	lightningds[0].Shutdown()
+	require.NoError(lightningds[0].WaitForLog(
+		"plugin-peerswap: Killing plugin: exited during normal operation", 30))
+}