File tree Expand file tree Collapse file tree
modules/transport-netty4/src/main/java/org/elasticsearch/transport/netty4 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020package org .elasticsearch .transport .netty4 ;
2121
2222import io .netty .channel .Channel ;
23+ import io .netty .channel .ChannelException ;
2324import io .netty .channel .ChannelOption ;
2425import io .netty .channel .ChannelPromise ;
26+ import java .io .IOException ;
2527import org .elasticsearch .ExceptionsHelper ;
2628import org .elasticsearch .action .ActionListener ;
2729import org .elasticsearch .common .bytes .BytesReference ;
@@ -71,9 +73,13 @@ public void addCloseListener(ActionListener<Void> listener) {
7173 }
7274
7375 @ Override
74- public void setSoLinger (int value ) {
76+ public void setSoLinger (int value ) throws IOException {
7577 if (channel .isOpen ()) {
76- channel .config ().setOption (ChannelOption .SO_LINGER , value );
78+ try {
79+ channel .config ().setOption (ChannelOption .SO_LINGER , value );
80+ } catch (ChannelException e ) {
81+ throw new IOException (e );
82+ }
7783 }
7884 }
7985
You can’t perform that action at this time.
0 commit comments