Skip to content

Commit

Permalink
conditionally call disconnect in SendResponse
Browse files Browse the repository at this point in the history
Signed-off-by: Nicklas Warming Jacobsen <[email protected]>
  • Loading branch information
Nicklas Warming Jacobsen committed Feb 1, 2024
1 parent 1cb88d0 commit 069e9db
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ class TransferManager private constructor(private val context: Context) {

fun sendResponse(deviceResponse: ByteArray, closeAfterSending: Boolean) {
communication.sendResponse(deviceResponse, closeAfterSending)
disconnect(!closeAfterSending)
if (closeAfterSending) {
disconnect(false)
}
}

fun readDocumentEntries(documentName: String): DocumentElements {
Expand Down

0 comments on commit 069e9db

Please sign in to comment.