{"record":{"id":"0b3aa3a0d72eff0a","repo":"shadow1ng/fscan","slug":"connection-lost-and-reconnect-failed","errorCode":null,"errorMessage":"connection lost and reconnect failed","messagePattern":"connection lost and reconnect failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/service_probe.go","lineNumber":24,"sourceCode":"\t\"io\"\n\t\"net\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/shadow1ng/fscan/common\"\n\t\"github.com/shadow1ng/fscan/common/i18n\"\n\t\"github.com/shadow1ng/fscan/core/portfinger\"\n)\n\n// 默认超时时间常量\nconst (\n\tdefaultTotalWaitMS = 3000 // 服务探测默认等待时间\n\tdefaultIntensity   = 7    // 默认探测强度 (1-9)\n)\n\nvar errConnLost = errors.New(\"connection lost and reconnect failed\")\n\n// sslSecondProbes SSL服务二次探测的探针名称\nvar sslSecondProbes = []string{\"TerminalServerCookie\", \"TerminalServer\"}\n\n// Probe PortFinger探测器类型别名 - 简化引用\ntype (\n\tProbe = portfinger.Probe\n\t// Match PortFinger匹配规则类型别名\n\tMatch = portfinger.Match\n)\n\n// PortFinger全局访问 - 简化探测器访问\nvar (\n\tv           = portfinger.GetGlobalVScan()\n\tnull        = portfinger.GetNullProbe()\n\tcommonProbe = portfinger.GetCommonProbe()\n\tDecodeData  = portfinger.DecodeData\n)","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/core/service_probe.go#L6-L42","documentation":"Guard error returned by Info.Write and Info.Read in the service probe layer when the underlying net.Conn is nil, i.e. the TLS/connection was lost and a reconnect either never happened or failed. It aborts further I/O on a dead connection rather than nil-dereferencing.","triggerScenarios":"Thrown at core/service_probe.go:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-establish the connection (re-run the probe dial) before retrying reads/writes","Treat as non-fatal: drop this probe attempt and let the scanner move to the next target","Inspect why the connection dropped: network flakiness, RST from an IDS, or probe timeout"],"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"}