File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/main/scala/li/cil/oc/server/component Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,9 @@ object InternetCard {
329
329
private def checkConnected () = {
330
330
if (owner.isEmpty) throw new IOException (" connection lost" )
331
331
try {
332
- if (isAddressResolved) channel.finishConnect()
332
+ if (isAddressResolved) {
333
+ channel.finishConnect()
334
+ }
333
335
else if (address.isCancelled) {
334
336
// I don't think this can ever happen, Justin Case.
335
337
channel.close()
@@ -341,14 +343,15 @@ object InternetCard {
341
343
case e : ExecutionException => throw e.getCause
342
344
}
343
345
isAddressResolved = true
344
- false
346
+ // After address resolution, immediately attempt connection
347
+ channel.finishConnect()
345
348
}
346
349
else false
347
350
}
348
351
catch {
349
352
case t : Throwable =>
350
353
close()
351
- false
354
+ throw t // Propagate exception instead of returning false
352
355
}
353
356
}
354
357
You can’t perform that action at this time.
0 commit comments