Commit cc49c01
committed
fix(sdk): treat the read timeout as a total budget across skipped frames
chat.messages.next() and once() re-issued the wait with the caller's full
timeout on every skipped invalid frame, so the timeout was per attempt
rather than a total. A client sending invalid frames faster than the
timeout kept the read blocked indefinitely and the documented return on
timeout never fired.
Both now compute a deadline once and pass the remaining time to each
attempt, which also preserves the existing zero-timeout behaviour of
draining only what is already buffered.1 parent b70a880 commit cc49c01
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1996 | 1996 | | |
1997 | 1997 | | |
1998 | 1998 | | |
1999 | | - | |
2000 | | - | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
2001 | 2006 | | |
2002 | 2007 | | |
2003 | | - | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
2004 | 2011 | | |
2005 | 2012 | | |
2006 | 2013 | | |
| |||
2055 | 2062 | | |
2056 | 2063 | | |
2057 | 2064 | | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
2058 | 2074 | | |
2059 | 2075 | | |
2060 | | - | |
| 2076 | + | |
2061 | 2077 | | |
2062 | 2078 | | |
2063 | 2079 | | |
| |||
0 commit comments