mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +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
|
||||
size -= truncateAmt
|
||||
}
|
||||
if size <= 0 {
|
||||
return realDataOffset, nil, nil
|
||||
}
|
||||
}
|
||||
partMap := file.computePartMap(offset, size)
|
||||
dataEntryMap, err := entry.loadDataPartsForRead(ctx, getPartIdxsFromMap(partMap))
|
||||
|
@ -342,7 +342,10 @@ func (w *WshRpc) runServer() {
|
||||
continue
|
||||
}
|
||||
if msg.IsRpcRequest() {
|
||||
go w.handleRequest(&msg)
|
||||
go func() {
|
||||
defer panichandler.PanicHandler("handleRequest:goroutine")
|
||||
w.handleRequest(&msg)
|
||||
}()
|
||||
} else {
|
||||
respCh := w.getResponseCh(msg.ResId)
|
||||
if respCh == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user