{"record":{"id":"be42fc25d73ad384","repo":"sqlmapproject/sqlmap","slug":"connection-closed-by-server","errorCode":null,"errorMessage":"connection closed by server","messagePattern":"connection closed by server","errorType":"exception","errorClass":"InterfaceError","httpStatus":null,"severity":"error","filePath":"extra/dbwire/__init__.py","lineNumber":124,"sourceCode":"    except Exception:\n        pass\n\ndef recvn(sock, n):\n    \"\"\"\n    Read exactly n bytes off `sock`, or raise - every wire protocol here is framed, so a short read is a\n    desynchronized stream, not a smaller message.\n\n    Shared because it was five identical copies: a fix to the recv loop has to land once, not per module.\n    \"\"\"\n\n    buf = b\"\"\n    while len(buf) < n:\n        try:\n            chunk = sock.recv(n - len(buf))\n        except (socket.error, OSError) as ex:\n            raise connection_lost(ex)\n        if not chunk:\n            raise InterfaceError(\"connection closed by server\")\n        buf += chunk\n    return buf\n","sourceCodeStart":106,"sourceCodeEnd":127,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/dbwire/__init__.py#L106-L127","documentation":"Error \"connection closed by server\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/dbwire/__init__.py:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}