Commit 2d579e7
committed
Clarify SocketConnectionBase exception handling flow report.
Motivation:
SocketConnectionBase handleException method should only be called by the underlying socket exception handler, when it happens the close handler will be called subsequently by the socket.
Changes:
Instead of calling the internal handleClose from the handleException method, we should capture the exception reported and reuse it when handleClosed is called.
Remove the handleException call from the try/catch block in handleMessage, handleMessage should never throw an exception, if it does, it will be logged by the socket calling handleMessage (that would be a bug).
Remove the PgSocketConnection handleException override that reports the exception, since now the base method will capture the exception, the handleClose will call reportException instead.
Remove unused DB2SocketConnection code that was doing nothing.
Make a few methods private to SocketConnectionBase to ensure they are only called in an expected way.1 parent afde921 commit 2d579e7
4 files changed
Lines changed: 12 additions & 35 deletions
File tree
- vertx-db2-client/src/main/java/io/vertx/db2client/impl
- vertx-pg-client/src
- main/java/io/vertx/pgclient/impl
- test/java/io/vertx/tests/pgclient
- vertx-sql-client-codec/src/main/java/io/vertx/sqlclient/codec
Lines changed: 0 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | 129 | | |
140 | 130 | | |
141 | 131 | | |
| |||
146 | 136 | | |
147 | 137 | | |
148 | 138 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 139 | | |
Lines changed: 0 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 125 | | |
135 | 126 | | |
136 | 127 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
Lines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 152 | + | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
| |||
413 | 409 | | |
414 | 410 | | |
415 | 411 | | |
416 | | - | |
| 412 | + | |
417 | 413 | | |
418 | 414 | | |
419 | | - | |
| 415 | + | |
420 | 416 | | |
421 | 417 | | |
422 | 418 | | |
423 | 419 | | |
424 | | - | |
| 420 | + | |
425 | 421 | | |
426 | 422 | | |
427 | | - | |
| 423 | + | |
428 | 424 | | |
429 | 425 | | |
430 | 426 | | |
431 | 427 | | |
432 | 428 | | |
433 | 429 | | |
434 | 430 | | |
435 | | - | |
| 431 | + | |
436 | 432 | | |
437 | 433 | | |
438 | 434 | | |
| |||
0 commit comments