Skip to content
Snippets Groups Projects
Commit 2b4afe97 authored by Moritz Halbritter's avatar Moritz Halbritter
Browse files

Merge branch '2.7.x' into 3.0.x

Closes gh-37459
parents a49dc0c0 6805a339
Branches
Tags
No related merge requests found
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -69,8 +69,14 @@ public abstract class DomainSocket extends AbstractSocket {
private FileDescriptor open(String path) {
int handle = socket(PF_LOCAL, SOCK_STREAM, 0);
connect(path, handle);
return new FileDescriptor(handle, this::close);
try {
connect(path, handle);
return new FileDescriptor(handle, this::close);
}
catch (RuntimeException ex) {
this.close(handle);
throw ex;
}
}
private int read(ByteBuffer buffer) throws IOException {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment