Skip to content

Commit 0f1170e

Browse files
Revert "Fix batchCallBuffer timeout handling"
This reverts commit 5061259. Timeout handling for batches was improved upstream in this PR ethereum/go-ethereum#26681 which will be merged in in the next commit. Reverting this commit to make the merge cleaner.
1 parent a07ccaf commit 0f1170e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

rpc/handler.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,7 @@ func (b *batchCallBuffer) timeout(ctx context.Context, conn jsonWriter) {
158158
for _, msg := range b.calls {
159159
if !msg.isNotification() {
160160
resp := msg.errorResponse(&internalServerError{errcodeTimeout, errMsgTimeout})
161-
serialized, err := json.Marshal(resp)
162-
if err != nil {
163-
conn.writeJSON(ctx, errorMessage(&parseError{"error serializing timeout error: " + err.Error()}), true)
164-
b.wrote = true
165-
return
166-
}
167-
168-
b.resp = append(b.resp, serialized)
161+
b.resp = append(b.resp, resp)
169162
}
170163
}
171164
b.doWrite(ctx, conn, true)
@@ -237,7 +230,7 @@ func (h *handler) handleBatch(msgs []*jsonrpcMessage) {
237230
resp := h.handleCallMsg(cp, msg)
238231
err := callBuffer.pushResponse(resp)
239232
if err != nil {
240-
h.conn.writeJSON(cp.ctx, errorMessage(err), true)
233+
h.conn.writeJSON(cp.ctx, errorMessage(err))
241234
return
242235
}
243236
}

0 commit comments

Comments
 (0)