Skip to content

Commit

Permalink
chore: set 60 seconds as altinn timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsOveTen committed Jan 9, 2024
1 parent d9443b7 commit 2be4230
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/no/fdk/userapi/adapter/AltinnAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ private val logger = LoggerFactory.getLogger(AltinnAdapter::class.java)

@Service
class AltinnAdapter(private val hostProperties: HostProperties) {
private val tenSeconds = 10000
private val sixtySeconds = 60000

private fun altinnStream(url: URL): InputStream =
with(url.openConnection() as HttpURLConnection) {
connectTimeout = tenSeconds
connectTimeout = sixtySeconds
connect()
if (HttpStatus.resolve(responseCode)?.is2xxSuccessful == true) {
inputStream
Expand Down

0 comments on commit 2be4230

Please sign in to comment.