aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction_handlers.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-05 17:36:23 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-05 17:36:23 -0700
commitc4208f864659a6d5b5d9a2a7e0fe069565033f6b (patch)
treef492fd2ab686b886c499bce0465202e7bdff986d /hotline/transaction_handlers.go
parent37a954c82b1e58d94bdb72c9fbdfc49c49785111 (diff)
Replace unsafe conn.Read with io.ReadFull
Diffstat (limited to 'hotline/transaction_handlers.go')
-rw-r--r--hotline/transaction_handlers.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go
index 5dc2be5..9e524e8 100644
--- a/hotline/transaction_handlers.go
+++ b/hotline/transaction_handlers.go
@@ -1411,7 +1411,9 @@ func HandleDownloadFolder(cc *ClientConn, t *Transaction) (res []Transaction, er
ReferenceNumber: transactionRef,
Type: FolderDownload,
}
+ cc.Server.mux.Lock()
cc.Server.FileTransfers[data] = fileTransfer
+ cc.Server.mux.Unlock()
cc.Transfers[FolderDownload] = append(cc.Transfers[FolderDownload], fileTransfer)
var fp FilePath