Skip to content
Snippets Groups Projects
Commit 943ff52e authored by Anthony Mallet's avatar Anthony Mallet
Browse files

[wip/tcl-genomix] Import upstream bugfix for nested http requests

parent 596926ef
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
# Created: Anthony Mallet on Fri, 19 Oct 2012
#
PKGREVISION= 1
DISTNAME= tcl-genomix-1.2
CATEGORIES= supervision
MASTER_SITES= ${MASTER_SITE_OPENROBOTS:=tcl-genomix/}
......
SHA1 (tcl-genomix-1.2.tar.gz) = 6e5b081a055b899f5ef4cad08f3970150134a69f
RMD160 (tcl-genomix-1.2.tar.gz) = 9ddacb79d9cc4705807c43e6183daaab76f2a39a
Size (tcl-genomix-1.2.tar.gz) = 69408 bytes
SHA1 (patch-aa) = ea96d0fc9e7ccf436df696c57e07c0686e33811a
From 038ff1e69b8a9d947b4f9fce2aa2485b6f742700
When dealing with nested http requests, the innermost request (the latest one)
gets its result from the last element in the results stack. Definitely not from
the first one.
This fixes random failures under a high throughput requests flow, where http
results where sometimes mixed.
diff --git src/http.tcl src/http.tcl
index a21d250..114b7ee 100644
--- src/http.tcl
+++ src/http.tcl
@@ -55,7 +55,8 @@ namespace eval genomix::http {
# pop results
fileevent $sock readable $e
- set pending($sock) [lassign $pending($sock) r]
+ set r [lindex $pending($sock) end]
+ set pending($sock) [lrange $pending($sock) 0 end-1]
incr pindex($sock) -1
switch -- [dict get $r state] {
ok { return $r }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment