Add chunk number to Response::Transfer.
parent
3c7a2eb8f7
commit
31604fe857
|
@ -56,7 +56,8 @@ end
|
|||
class FileStorage::Response
|
||||
JSONIPC.request Transfer, 40 do
|
||||
property mid : String
|
||||
def initialize(@mid)
|
||||
property n : Int32 # chunk number
|
||||
def initialize(@mid, @n)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -82,7 +82,7 @@ class FileStorage::Storage
|
|||
|
||||
# TODO: verify the digest, if no more chunks.
|
||||
|
||||
FileStorage::Response::Transfer.new mid
|
||||
FileStorage::Response::Transfer.new mid, chunk_number
|
||||
rescue e
|
||||
puts "Error handling transfer: #{e.message}"
|
||||
FileStorage::Response::Error.new mid.not_nil!, "Unexpected error: #{e.message}"
|
||||
|
|
Loading…
Reference in New Issue