mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
fix blockstore panic (#1570)
This commit is contained in:
parent
0925af5300
commit
8ae6e47d9b
@ -227,6 +227,9 @@ func (entry *CacheEntry) readAt(ctx context.Context, offset int64, size int64, r
|
|||||||
offset += truncateAmt
|
offset += truncateAmt
|
||||||
size -= truncateAmt
|
size -= truncateAmt
|
||||||
}
|
}
|
||||||
|
if size <= 0 {
|
||||||
|
return realDataOffset, nil, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
partMap := file.computePartMap(offset, size)
|
partMap := file.computePartMap(offset, size)
|
||||||
dataEntryMap, err := entry.loadDataPartsForRead(ctx, getPartIdxsFromMap(partMap))
|
dataEntryMap, err := entry.loadDataPartsForRead(ctx, getPartIdxsFromMap(partMap))
|
||||||
|
@ -342,7 +342,10 @@ func (w *WshRpc) runServer() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if msg.IsRpcRequest() {
|
if msg.IsRpcRequest() {
|
||||||
go w.handleRequest(&msg)
|
go func() {
|
||||||
|
defer panichandler.PanicHandler("handleRequest:goroutine")
|
||||||
|
w.handleRequest(&msg)
|
||||||
|
}()
|
||||||
} else {
|
} else {
|
||||||
respCh := w.getResponseCh(msg.ResId)
|
respCh := w.getResponseCh(msg.ResId)
|
||||||
if respCh == nil {
|
if respCh == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user