Commit 3ea15b9
Matthew Sackman
After considerable investigation with Matthias, worked out that the ExceptionHandler probably shouldn't be being used, because the DefaultEH does stuff which is probably useful, or at least we don't understand the implications of not using it. SSL Handshake seems to be done lazily - at the point at which data is first exchanged on the socket. Thus the socket opening is not enough to generate the SSL Handshake Exceptions. Now because of the race between the user thread and the MainLoop as to who first really accesses the socket (could be the user thread sending the header, or the main loop blocking on read), it was not deterministic which thread would get he ssl handshake exception.
So slightly tidied the AMQConnection class so that it doesn't do so many bad things in its constructor, and that we make sure we send the header first, before starting up the MainLoop thread. Thus if the MainLoop thread gets started then we know the SSL Handshake has been done. This means that the exception comes out in the right thread.
Thus also reverted the factory so that you can't set the ExceptionHandler. All tests pass. There were some associated changes elsewhere, which eclipse found.1 parent d20f72c commit 3ea15b9
File tree
5 files changed
+45
-100
lines changed- src/com/rabbitmq/client
- impl
- test/src/com/rabbitmq/client/test
- ssl
5 files changed
+45
-100
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 58 | | |
66 | 59 | | |
67 | 60 | | |
| |||
104 | 97 | | |
105 | 98 | | |
106 | 99 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 100 | | |
125 | 101 | | |
126 | 102 | | |
| |||
197 | 173 | | |
198 | 174 | | |
199 | 175 | | |
200 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
201 | 180 | | |
202 | 181 | | |
203 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | 172 | | |
175 | 173 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 174 | + | |
| 175 | + | |
179 | 176 | | |
180 | 177 | | |
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
184 | | - | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
189 | 183 | | |
190 | 184 | | |
191 | | - | |
192 | 185 | | |
193 | 186 | | |
194 | | - | |
195 | 187 | | |
196 | 188 | | |
197 | 189 | | |
| |||
202 | 194 | | |
203 | 195 | | |
204 | 196 | | |
| 197 | + | |
205 | 198 | | |
206 | | - | |
207 | | - | |
208 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
| |||
316 | 334 | | |
317 | 335 | | |
318 | 336 | | |
| 337 | + | |
319 | 338 | | |
320 | 339 | | |
321 | 340 | | |
322 | 341 | | |
323 | 342 | | |
324 | | - | |
| 343 | + | |
325 | 344 | | |
326 | 345 | | |
327 | 346 | | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
| |||
414 | 420 | | |
415 | 421 | | |
416 | 422 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
Lines changed: 4 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
48 | 47 | | |
49 | | - | |
50 | | - | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
57 | | - | |
58 | | - | |
59 | 54 | | |
60 | 55 | | |
61 | 56 | | |
62 | | - | |
63 | | - | |
64 | 57 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 58 | | |
85 | 59 | | |
86 | 60 | | |
| |||
117 | 91 | | |
118 | 92 | | |
119 | 93 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
132 | 97 | | |
133 | 98 | | |
134 | 99 | | |
| |||
0 commit comments