1"use strict";(globalThis.webpackChunkcontrolzero_docs||=[]).push([[6279],{94388(e,r,n){n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"errors/E1601-guard-after-close","title":"E1601. guard() called after close()","description":"Severity: ERROR. Programmer error.","source":"@site/docs/errors/E1601-guard-after-close.md","sourceDirName":"errors","slug":"/errors/E1601-guard-after-close","permalink":"/docs/errors/E1601-guard-after-close","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"E1601-guard-after-close","title":"E1601. guard() called after close()","sidebar_label":"E1601"}}');var o=n(74848),s=n(28453);const a={id:"E1601-guard-after-close",title:"E1601. guard() called after close()",sidebar_label:"E1601"},l="E1601. guard() called after close()",c={},d=[{value:"What happened",id:"what-happened",level:2},{value:"How to fix",id:"how-to-fix",level:2},{value:"See also",id:"see-also",level:2}];function i(e){const r={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"e1601-guard-called-after-close",children:"E1601. guard() called after close()"})}),"\n",(0,o.jsxs)(r.blockquote,{children:["\n",(0,o.jsxs)(r.p,{children:["Severity: ",(0,o.jsx)(r.strong,{children:"ERROR"}),". Programmer error."]}),"\n"]}),"\n",(0,o.jsx)(r.h2,{id:"what-happened",children:"What happened"}),"\n",(0,o.jsxs)(r.p,{children:["Your code called ",(0,o.jsx)(r.code,{children:"Client.guard()"})," on a Client that already had\n",(0,o.jsx)(r.code,{children:"close()"})," called on it. The SDK refuses to continue auditing because\nthe audit sinks have been drained and shut down."]}),"\n",(0,o.jsx)(r.h2,{id:"how-to-fix",children:"How to fix"}),"\n",(0,o.jsxs)(r.p,{children:["Restructure your code so ",(0,o.jsx)(r.code,{children:"close()"})," runs exactly once, at the end of\nthe agent's lifecycle. The most common cause is putting ",(0,o.jsx)(r.code,{children:"close()"}),"\ninside a ",(0,o.jsx)(r.code,{children:"finally"})," that fires per-iteration instead of once."]}),"\n",(0,o.jsx)(r.h2,{id:"see-also",children:"See also"}),"\n",(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsx)(r.li,{children:(0,o.jsx)(r.a,{href:"./",children:"Errors index"})}),"\n"]})]})}function u(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},28453(e,r,n){n.d(r,{R:()=>a,x:()=>l});var t=n(96540);const o={},s=t.createContext(o);function a(e){const r=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(s.Provider,{value:r},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.