Skip to content

Commit cd8851e

Browse files
committed
Merge remote-tracking branch 'origin' into master-MC1.12
2 parents 113d5a1 + b0b022a commit cd8851e

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ forge.version=14.23.5.2860
55

66
mod.name=OpenComputers
77
mod.group=li.cil.oc
8-
mod.version=1.8.5-snapshot
8+
mod.version=1.8.6-snapshot
99

1010
ae2.version=rv6-stable-7
1111
buildcraft.version=7.99.24.8

changelog.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Fixes/improvements
22

3-
* [#3710] Fix localization regression introduced in 1.8.4.
3+
* [#3731] Fix string.format() omission in OpenOS package.lua.
4+
* [#3735] Fix server hangs on long-lasting HTTP requests.
45

56
## List of contributors
67

7-
asie, Computerdores, ff66theone, Glease, Hawk777, repo-alt, RobertCochran, yut23
8+
asie, REUSS-dev

src/main/resources/assets/opencomputers/loot/openos/lib/core/boot.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- called from /init.lua
22
local raw_loadfile = ...
33

4-
_G._OSVERSION = "OpenOS 1.8.5"
4+
_G._OSVERSION = "OpenOS 1.8.6"
55

66
-- luacheck: globals component computer unicode _OSVERSION
77
local component = component

src/main/scala/li/cil/oc/server/component/InternetCard.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,12 +528,18 @@ object InternetCard {
528528
out.close()
529529
}
530530

531+
// Finish the connection. Call getInputStream a second time below to re-throw any exception.
532+
// This avoids getResponseCode() waiting for the connection to end in the synchronized block.
533+
try {
534+
http.getInputStream
535+
} catch {
536+
case _: Exception =>
537+
}
538+
531539
HTTPRequest.this.synchronized {
532540
response = Some((http.getResponseCode, http.getResponseMessage, http.getHeaderFields))
533541
}
534542

535-
// Calling getInputStream() can cause an exception to be thrown for unsuccessful HTTP responses,
536-
// so call it only after the response code/message are set to allow retrieving them.
537543
// TODO: This should allow accessing getErrorStream() for reading unsuccessful HTTP responses' output,
538544
// but this would be a breaking change for existing OC code.
539545
http.getInputStream

0 commit comments

Comments
 (0)