Commit 02d5557
committed
Fix stale bearerToken closure by deferring registerConnection until after metadata refresh
Move registerConnection(connection) after the metadata refresh succeeds, so
a connection with a stale activeBearerToken is never registered in the global
map. In the 401 retry path, dispose the unregistered connection directly
instead of calling removeConnection (which expects a registered connection).
In the outer catch, handle both registered and unregistered connections.1 parent 1e34360 commit 02d5557
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | | - | |
1068 | | - | |
1069 | 1067 | | |
1070 | 1068 | | |
1071 | 1069 | | |
| |||
1087 | 1085 | | |
1088 | 1086 | | |
1089 | 1087 | | |
1090 | | - | |
| 1088 | + | |
1091 | 1089 | | |
1092 | 1090 | | |
1093 | 1091 | | |
1094 | 1092 | | |
1095 | 1093 | | |
1096 | 1094 | | |
1097 | 1095 | | |
| 1096 | + | |
1098 | 1097 | | |
1099 | 1098 | | |
1100 | 1099 | | |
1101 | | - | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1102 | 1104 | | |
1103 | 1105 | | |
1104 | 1106 | | |
| |||
0 commit comments