{"record":{"id":"7de1b683503b143d","repo":"shadow1ng/fscan","slug":"close","errorCode":null,"errorMessage":"close","messagePattern":"close","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/grdp/login/screen.go","lineNumber":237,"sourceCode":"\t\tinfo[\"reconn\"] = protocol\n\t\tg.pdu.Emit(\"close\")\n\t\texitFlag <- true\n\t})\n\n\terr = g.x224.Connect()\n\tif err != nil {\n\t\tinfo[\"err\"] = err.Error()\n\t\treturn\n\t}\n\tglog.Info(\"wait connect ok\")\n\n\tg.pdu.On(\"error\", func(e error) {\n\t\terr = e\n\t\tglog.Error(\"error\", e)\n\t\tg.pdu.Emit(\"done\")\n\t})\n\tg.pdu.On(\"close\", func() {\n\t\terr = errors.New(\"close\")\n\t\tglog.Info(\"on close\")\n\t\tg.pdu.Emit(\"done\")\n\t})\n\tg.pdu.On(\"success\", func() {\n\t\tglog.Debugf(\"===============login success %s===============\", ip)\n\t\terr = nil\n\t\tg.pdu.Emit(\"done\")\n\t})\n\tg.pdu.On(\"ready\", func() {\n\t\terr = nil\n\t\tglog.Debug(\"on ready\")\n\t})\n\tg.pdu.On(\"bitmap\", func(rectangles []pdu.BitmapData) {\n\t})\n\tg.pdu.On(\"done\", func() {\n\t\tglog.Debug(\"done signal triggered\")\n\t\texitFlag <- true\n\t})","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/libs/grdp/login/screen.go#L219-L255","documentation":"Synthetic error created inside the RDP 'close' event handler: the PDU layer reported the session closed (server dropped the connection) without a preceding 'success' or explicit 'error' event, so a generic error is fabricated to signal the connection ended prematurely.","triggerScenarios":"Thrown at libs/grdp/login/screen.go:237 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the RDP connection once; transient closes are common","Check network reachability and whether the server limits concurrent sessions","Distinguish this from real errors by treating a bare close as 'incomplete', not failure with credentials"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}