@@ -888,6 +888,7 @@ func runDaemonRemoteStream(ctx context.Context, runner conversation.Runner, now
888888 pumpState .FrameCount = result .FrameCount
889889 pumpState .ConnectCount = result .ConnectCount
890890 pumpState .ReconnectCount = result .ReconnectCount
891+ pumpState .CloseCode = result .CloseCode
891892 pumpState .LastPollAt = time .Now ().UTC ().Format (time .RFC3339Nano )
892893 pumpState .StreamEndedAt = pumpState .LastPollAt
893894 pumpState .StreamStopReason = daemonRemoteStreamStopReason (ctx , streamOptions , result )
@@ -906,6 +907,7 @@ func runDaemonRemoteStream(ctx context.Context, runner conversation.Runner, now
906907 structured ["frame_count" ] = pumpState .FrameCount
907908 structured ["connect_count" ] = pumpState .ConnectCount
908909 structured ["reconnect_count" ] = pumpState .ReconnectCount
910+ structured ["close_code" ] = pumpState .CloseCode
909911 structured ["stream_started_at" ] = pumpState .StreamStartedAt
910912 structured ["stream_ended_at" ] = pumpState .StreamEndedAt
911913 structured ["stream_stop_reason" ] = pumpState .StreamStopReason
@@ -1075,6 +1077,7 @@ func runDaemonRemotePoll(ctx context.Context, runner conversation.Runner, now ti
10751077 LastCursor : previous .LastCursor ,
10761078 LastPollAt : now .UTC ().Format (time .RFC3339Nano ),
10771079 StatusCode : remoteFetch .StatusCode ,
1080+ CloseCode : remoteFetch .CloseCode ,
10781081 FrameCount : remoteFetch .FrameCount ,
10791082 ConnectCount : remoteFetch .ConnectCount ,
10801083 ReconnectCount : remoteFetch .ReconnectCount ,
@@ -1096,6 +1099,7 @@ func runDaemonRemotePoll(ctx context.Context, runner conversation.Runner, now ti
10961099 structured ["poll_url" ] = pumpState .PollURL
10971100 structured ["websocket_url" ] = pumpState .WebSocketURL
10981101 structured ["status_code" ] = remoteFetch .StatusCode
1102+ structured ["close_code" ] = remoteFetch .CloseCode
10991103 structured ["frame_count" ] = remoteFetch .FrameCount
11001104 structured ["connect_count" ] = remoteFetch .ConnectCount
11011105 structured ["reconnect_count" ] = remoteFetch .ReconnectCount
@@ -1122,6 +1126,7 @@ func runDaemonRemotePoll(ctx context.Context, runner conversation.Runner, now ti
11221126 structured ["websocket_url" ] = pumpState .WebSocketURL
11231127 structured ["last_cursor" ] = pumpState .LastCursor
11241128 structured ["status_code" ] = pumpState .StatusCode
1129+ structured ["close_code" ] = pumpState .CloseCode
11251130 structured ["frame_count" ] = pumpState .FrameCount
11261131 structured ["connect_count" ] = pumpState .ConnectCount
11271132 structured ["reconnect_count" ] = pumpState .ReconnectCount
@@ -1143,6 +1148,7 @@ type daemonRemoteFetch struct {
11431148 Transport string
11441149 StatusCode int
11451150 NextCursor string
1151+ CloseCode int
11461152 FrameCount int
11471153 ConnectCount int
11481154 ReconnectCount int
@@ -1170,6 +1176,7 @@ func fetchDaemonRemoteEvents(ctx context.Context, registration remotepkg.Registr
11701176 FrameCount : ws .FrameCount ,
11711177 ConnectCount : ws .ConnectCount ,
11721178 ReconnectCount : ws .ReconnectCount ,
1179+ CloseCode : ws .CloseCode ,
11731180 Events : ws .Events ,
11741181 Error : ws .Error ,
11751182 }
0 commit comments